System and method for controlling user interface properties with data

ABSTRACT

Described is a system and method for controlling user interface (UI) properties with data. An application is separated into independent parts, a logic portion and a UI portion. The logic portion manipulates data values within the application. The UI portion is responsible for displaying UI properties. A binding specification describes a relationship between the UI property and the data value. The binding specification is used by system level code to determine the manner in which it is notified when the data value undergoes a change and the manner in which it directs the UI portion to reflect the change in the UI property. The binding specification identifies a source data item, a path to the data value in the source data item, a target UI element, and the UI property on the target UI element. The binding may be specified using code or markup language.

RELATED APPLICATIONS

[0001] This utility patent application claims the benefit under 35United States Code § 119(e) of U.S. patent application Ser. No.10/440,081 filed on May 17, 2003.

BACKGROUND OF THE INVENTION

[0002] The manner in which information is presented to users affects theuser's ability to understand and comprehend the information. On computerdisplays, it has become a standard practice to add emphasis toinformation by using color, font styles, and the like. This emphasisallows users to more readily grasp the importance of the information.The code handling the presentation of the information (user interface)and the code performing the application logic on the information aretypically closely coupled. For example, the logic assigns user interfaceproperties (e.g., color, font, position, size) directly with data. Thus,when there is a change to the user interface, the logic must typicallyalso change. For example, in the case of a text box, the user interfacecode listens to determine whether text has changed, upon a change, theuser interface code validates the changed text and then displays thechanged text. This tightly coupled nature of the user-interface and thelogic results in very fragile code. Maintaining this fragile code isvery costly and time consuming.

SUMMARY OF THE INVENTION

[0003] The present invention is directed at a system and method forcontrolling the user interface with data. The invention decouples theuser interface and the data, along with its application logic, byproviding a mechanism for associating data to the user interface. Theinvention enables user interface designers and application authors whowrite the application logic to work independently. Neither the designersnor the authors need to understand the other's code or will impact theother's code development. This invention also allows changes to the userinterface to be done quite easily. For example, when new and moreuser-appealing user interface platforms become available or when theuser interface designer wishes to change the look of the application,the designer does not need to change the application logic. In addition,the mechanism for associating data to the user interface is dynamic.This allows any changes in the data to be automatically reflected in thepresentation. In addition, any input from a user via the user interfacecan be automatically update the data. Because the present inventionallows association of not only data display aspects of the userinterface (e.g., text), but also visual aspects (e.g., background, fontsize, and the like), descriptive, visually enhancing and flexiblepresentation of data can be provided. For example, negative numbers maybe displayed in red or an arrow may appear pointing upwards when stockprices are increasing.

[0004] Thus, in accordance with the present invention, an application isseparated into independent parts, a logic portion and a UI portion. Thelogic portion manipulates data values within the application. The UIportion is responsible for the presentation of the data. A bindingspecification describes a relationship between the UI property and thedata value. The binding specification is used by system level code todetermine the manner in which it is notified when the data valueundergoes a change and the manner in which it directs the UI portion toreflect the change in the UI property. The binding specificationidentifies a source data item, a path to the data value in the sourcedata item, a target UI element, and the UI property on the target UIelement. The binding may be specified using code or markup language.

BRIEF DESCRIPTION OF THE DRAWINGS

[0005]FIG. 1 illustrates an exemplary computing device that may be usedin illustrative implementations of the present invention.

[0006]FIG. 2 is a functional block diagram illustrating one embodimentfor controlling user interface properties with data in accordance withthe present invention.

[0007]FIG. 3 is a logical flow diagram illustrating a process forbinding a user interface property with a data value in accordance withone embodiment of the present invention.

[0008]FIG. 4 illustrates several exemplary syntaxes for associating theuser interface properties with the data in accordance with the presentinvention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0009] The present invention is directed at a system and method forcontrolling the user interface with data. The invention decouples theuser interface and the application logic by providing a mechanism forassociating the data with the user interface. As will be described indetail below, this decoupling of the user interface and the data, alongwith its associated logic, allows different groups of developers to workindependently on both the user interface and the logic without impactingthe code development of the other group. In addition, described indetail below, the present invention provides a system and mechanism forautomatically transferring values from data sources to the userinterface and vice versa. Throughout the following discussion, the term“databinding” refers to the process of associating data values with UIproperties, transferring and updating the data values, and the like.

[0010] Illustrative Computing Environment

[0011]FIG. 1 illustrates an exemplary computing device that may be usedin illustrative implementations of the present invention. With referenceto FIG. 1, in a very basic configuration, computing device 100 typicallyincludes at least one processing unit 102 and system memory 104.Depending on the exact configuration and type of computing device 100,system memory 104 may be volatile (such as RAM), non-volatile (such asROM, flash memory, etc.) or some combination of the two. System memory104 typically includes an operating system 105, one or more programmodules 106, and may include program data 107. Examples of programmodules 106 include a browser application, a finance managementapplication, a word processor, and the like. This basic configuration isillustrated in FIG. 1 by those components within dashed line 108

[0012] Computing device 100 may have additional features orfunctionality. For example, computing device 100 may also includeadditional data storage devices (removable and/or non-removable) suchas, for example, magnetic disks, optical disks, or tape. Such additionalstorage is illustrated in FIG. 1 by removable storage 109 andnon-removable storage 110. Computer storage media may include volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information, such as computerreadable instructions, data structures, program modules, or other data.System memory 104, removable storage 109 and non-removable storage 110are all examples of computer storage media. Computer storage mediaincludes, but is not limited to, RAM, ROM, EEPROM, flash memory or othermemory technology, CD-ROM, digital versatile disks (DVD) or otheroptical storage, magnetic cassettes, magnetic tape, magnetic diskstorage or other magnetic storage devices, or any other medium which canbe used to store the desired information and which can be accessed bycomputing device 100. Any such computer storage media may be part ofdevice 100. Computing device 100 may also have input device(s) 112 suchas keyboard, mouse, pen, voice input device, touch input device, etc.Output device(s) 114 such as a display, speakers, printer, etc. may alsobe included. These devices are well know in the art and need not bediscussed at length here.

[0013] Computing device 100 may also contain communication connections116 that allow the device 100 to communicate with other computingdevices 118, such as over a network. Communication connections 116 areone example of communication media. Communication media may typically beembodied by computer readable instructions, data structures, programmodules, or other data in a modulated data signal, such as a carrierwave or other transport mechanism, and includes any information deliverymedia. The term “modulated data signal” means a signal that has one ormore of its characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media includes wired media such as a wired network ordirect-wired connection, and wireless media such as acoustic, RF,infrared and other wireless media. The term computer readable media asused herein includes both storage media and communication media.

[0014] Illustrative Implementation

[0015]FIG. 2 is a functional block diagram illustrating one embodimentof a system 200 for controlling user interface properties with data inaccordance with the present invention. The system 200 includes anapplication 202, a platform 220, and a data source 230. Application 202may be one of applications 106 on computing device 100 shown in FIG. 1.The application 202 includes code (hereinafter referred to as logic 204)for manipulating a data value (e.g., source data value 238). In general,the logic 204 performs validation on data values and updates the datavalues. Data value (e.g., data value 238) represents the content of aproperty (i.e., a data source property) of a data item (e.g., data item232). The data item 232 is located within a data source (e.g., datasource 230). Each data source 230 may include several data items, eachdata item has one or more properties, in which the source data value isstored. Logic 203 may manipulate data values from multiple data sources.The data sources may include an XML document, an object, a dataset, andthe like. As will be described in greater detail below, each property ofthe data item may be used to control the user interface (UI).

[0016] The application 202 also includes code (hereinafter referred toas user interface 206) for presenting information. The user interface206 includes several user interface elements (e.g., user interfaceelement 208). Each user interface element 208 includes one or moreproperties (e.g., UI properties 210 and 212), such as for displayedtext, color, font, position, size, and the like. Then, as described indetail later, these UI properties 210 and 212 are associated with one ormore of the data values 238 and 242 in accordance with the presentinvention. In general, the association occurs via a binding engine 224within the platform 220. The platform 220 represents a system layer ofservices, such as an operating system, a virtual engine, and the like.The platform 220 also includes a property engine 222 that is responsiblefor maintaining hierarchical information pertaining to the data values234 and 242 and for updating the associated properties with data values.Even though binding engine 224 and property engine 222 are shown asseparate components, one skilled in the art will appreciate that thefunctionality provided by each may be included within one componentwithout departing from the present invention.

[0017] The association (i.e, bindings) of the data values 238 and 242 totheir UI properties 210 and 212 is represented in FIG. 2 by dashed linesfrom the data value to the UI property (hereinafter referred to asbindings 226 and 228). During the following discussion, the term “datavalue” may be used interchangeably with the term “source data value”.Similarly, the term UI property may be used interchangeably with theterm “target property”. These bindings 226 and 228 allow dynamicproperties (i.e., target properties) to be automatically set from datavalues (i.e., source data values), such as from properties of arbitraryobjects. These bindings may be dynamic so that the bound target propertyautomatically updates to reflect changes in the source data value.

[0018] In order to provide this automatic updating capability, thepresent invention further provides a notification mechanism (e.g.,represented in FIG. 2 by notifiers 236 and 240 and arrows from thenotifiers to platform 220). Each data item 232 and 234 has acorresponding notifier 236 and 240, respectively. The notificationmechanism is responsible for informing the system that the source datavalue has changed and that the data value can be propagated to thetarget property (i.e., UI property).

[0019] When a binding 226 and 228 is created, such as through markup,code, and the like, the binding engine 224 creates a binding object(e.g., binding objects 250 and 252) associated with the binding. Forexample, binding object 252 may represent binding 228 within the bindingengine 224. Each binding object includes several properties (e.g.,binding properties 260-272). Each of these binding properties 260-272may be set programmatically. The following discussion describes each ofthese properties and FIG. 4 illustrates exemplary code for activating abinding that specifies some of these properties.

[0020] One of the binding properties (hereinafter referred to as path260) identifies the manner in which to locate the source data value (viathe source object). The path 260 may refer to a property, sub-propertyor indexer on the source object, a column in ADO (ActiveX Data Objects),an XPath on XML, and the like. Alternatively, the path may refer to areflection or ADO path.

[0021] Another one of the binding properties (hereinafter referred to asbindtype 262 defines a type for the binding 226 and 228. In oneembodiment, the bindtype includes oneWay, twoWay, and oneTime. As anillustration, binding 226 represents a twoWay binding and binding 228represent a oneWay binding. One of these binding types is set as adefault. In one embodiment, twoway binding is set as the default bindingtype.

[0022] When the bindtype 262 is specified as oneWay, this signals thebinding engine 224 to update the target property (e.g., UI property 210)every time a change occurs in the associated source data value. OneWaybindtype is useful for binding a data value to a non-editable UIproperty, such as text color, text background, and the like. UsingoneWay bindtype avoids the overhead of a twoWay bindtype, describedbelow. This decrease in overhead is most noticeable when listening tochanges in UI properties regarding layout content. For these UIproperties, the dynamic properties of each of the children of the UIproperty must typically be listened to for changes to the UI property.OneWay bindtype may also be useful when changes in the UI property arejust for showing other presentation detail.

[0023] When the bindtype 262 is specified as twoWay, this signals thebinding engine 224 to update the target property every time a changeoccurs in the source data value and vice versa. TwoWay binding isespecially helpful when binding data to an edit box where any changesmade by the user in the edit box need to be propagated to the sourcedata value. Another scenario for twoway binding is when anotherapplication is responsible for the source data field and those changesare reflected in an edit box.

[0024] When the bindtype 262 is specified as oneTime, this signals thebinding engine 224 to initialize the target property once and then leaveit untouched, even if the associated source data value is changed. TheoneTime bindtype is useful when some target property needs to beinitialized with some value from a source field and the data context isnot known in advance. In addition, oneTime bindtype is useful forread-only use of unchanging source data values. If the data source doesnot support the property notification mechanism of the present invention(e.g., IPropertyChange interface), the target property that is specifiedas oneWay will be updated similarly as if the binding specified oneTimeas the bindtype.

[0025] Another one of the binding properties (hereinafter referred to asupdatetype 264) defines a type of update for the case in which bindtype262 specifies twoWay. Typically, twoWay bindings listen for changes inthe target property and propagate those changes back to the source datavalue. This process is referred to as updating the source. Normally, itis desirable to update whenever the target property changes. However, incertain situations, updating after every keystroke wastes cycles anddenies the user the opportunity for correcting typing errors and thelike. Updatetype 264 allows the user to specify when the updates shouldoccur. In one embodiment, updatetype 264 may specify Immediate,OnLostFocus, and Explicit. Specifying Immediate will signal the bindingengine to update the source data value after every change to the targetproperty. Specifying OnLostFocus will signal the binding engine toupdate the source data value after the target element has lost keyboardfocus. Specifying Explicit will signal the binding engine to update thesource data value only when the application explicitly requests anupdate. Typically, this explicit request is performed via a method. Eventhough this method may be called for any setting of updatetype 264, themethod is useful when the updatetype is set to Explicit. Exemplarymethods are shown below: Binding.GetBinding(myElement,myProperty).Update( ); and MyElement.GetBinding(myProperty).Update( )

[0026] Another one of the binding properties (hereinafter referred to assource 266) identifies the source data item for the binding. Briefly,illustrated in FIG. 4 and described in conjunction therewith, the source266 may be set programmatically or with markup. Programmatically, thedeveloper provides an objectref to the object that the binding shoulduse as the source data item. Briefly, described in detail in conjunctionwith FIG. 4, in markup, there are various methods for setting the sourceproperty.

[0027] Another one of the binding properties (hereinafter referred to astransformer 268) accepts a class reference. The class reference may bespecified using <Namespace>. <Class>, <Assembly>. The class referencethat is specified is invoked y the binding engine 224 to transform thesource data value into a format accepted by he target property. A methodwithin the class reference invokes this transformation, represented astransform 244 in FIG. 2. The class reference may also specify an inversetransform (not shown) for transforming the target property to a formataccepted by the source data value. The transform 244 may supply UIsemantics or be a custom type converter.

[0028] Another one of the binding properties (hereinafter referred to asculture 270) defines the manner in which the source data value should behandled before/after transforming the source data value. Culture 270operates in conjunction with transformer 268 to allow developers tospecify rules for transforming source data values. For example, theculture may specify a specific format for numbers, dates, and the like.In one embodiment, the culture 270 accepts a value of a typeCultureInfo. The developer has the option of using the rules specifiedby the culture 270 when implementing the transform.

[0029] Another one of the binding properties (hereinafter referred to asbindflags 272) provides a mechanism for receiving events signaling thetransfer of data. Because the above described method for data binding isasynchronous, the bindflags 272 allow a developer to know when thetarget has been updated with the new value. In order to use thismechanism, the bindflags 272 is set to “NotifyOnTransfer”. A handler isthen registered for the event using any customary ways. One exemplaryuse for this mechanism is as follows: Public static void main( ) { //Adda handler elem.AddAttachedHandler(Binding.DataTranferEvent, newDataTranferEventHandler(OnDataTransfer),RoutedEventArgs.EventStage.Direct); //Event handler private static voidOnDataTransfer(Element e, DataTransferEventArgs args) { DynamicPropertyDP=args.DP; v=e.GetValue(DP); DoSomething(v); } source.field=“newvalue”; }. Another exemplary method is: voidAddDataTransferHandler(UIElement elem) { // Add a handlerelem.AddHandler(Binding.DataTransferEventID, newDataTransferEventHandler(OnDataTransfer)); } // Event handler privatevoid OnDataTransfer(object sender, DataTransferEventArgs args) {DependencyProperty dp = args.Property; UIElement e = sender asUIElement; object v = e.GetValue(dp); DoSomething(v); }.

[0030] As shown in the above example code, once the OnDataTransfer eventhas been triggered, the developer knows that the dynamic property hasbeen updated. Thus, the developer may then use the target value forfurther processing.

[0031]FIG. 3 is a logical flow diagram illustrating a binding mechanismin accordance with one embodiment of the present invention. In overview,the binding mechanism performs actions to set-up the binding (blocks302-306) and then performs actions (blocks 310-338) related to changesin the target property or source data value as specified in the binding.Processing continues at block 302.

[0032] At block 302, a binding object is created based on the argumentsspecified during the creation. Briefly, each property (i.e., properties260-272 shown in FIG. 2) for the binding object 252 may be specified asan argument during the creation. The binding may be created throughmarkup, programmatically, and the like. FIG. 4 illustrates exemplarysyntaxes for creating a binding and specifying the properties 260-272.Each manner of creation specifies a source data item, a path to the datavalue in the source data item, a target UI element, and a target dynamicproperty on the UI element. While not shown in the present flow diagram,the properties of the binding object may also be modified dynamicallyduring runtime, such as through the use of application programminginterfaces (APIs). Processing proceeds to block 306.

[0033] At block 304, the binding is activated. In one embodiment, thebinding may be activated automatically once the binding engine noticesthat there is sufficient context for the binding, such as having thesource object exist, the target element ready to display, and the like.The binding engine is responsible for recognizing activation of thebinding. Processing continues at block 304.

[0034] At block 306, a value for the specified source property is found.In one embodiment, reflection is used to find the value. Reflection is ageneral mechanism that allows a caller to obtain information about arequested object. The information includes objects that are supported,public properties, and the like. In another embodiment, when data itemis a collection, the binding engine performs a number of heuristics todetermine whether the to use the current record or the data object(collection) itself. A first heuristic is applied when the bindingrefers to a property or indexer. In this situation, the correspondingproperty or indexer on the collection object is used if such a propertyor indexer exists. Alternatively, the current record of the collectionis used as the data item. Another heuristic is applied when no propertyor indexer exists. In this situation, the collection object is used forthe target property as long as the collection object is valid.Otherwise, the current record is used. Before continuing to block 308, atransform is applied to the value if the binding specifies a transform(block 307). The application of a transform is described in detail inconjunction with block 316 below. Processing continues at block 308.

[0035] At block 308, the value that was found is assigned to the targetproperty.

[0036] In one embodiment, a property engine that is responsible formaintaining the hierarchy of the properties may assign the value. Inanother embodiment, a transform specified during creation of the bindingmay be invoked to transform the value before assigning the value to thetarget property. In a further refinement, the property engine may markthe property as having a new value. Once blocks 302-308 have beenperformed, the binding engine is ready for updating target propertiesand source data values as needed. In general, the binding mechanism isasynchronous.

[0037] Therefore, from block 308, processing continues through twoasynchronous paths. A first path (blocks 310-318) is associated withupdating the target property and a second path (blocks 330-338) isassociated with updating the source data value. Each of these paths isdescribed below. First, the path responsible for updating the targetproperty is discussed.

[0038] At decision block 310, the binding engine determines whether thebinding associated with the source data value and the target propertyhas specified the bindtype as oneTime. If the bindtype is oneTime,processing is complete for this binding and proceeds to the end. Oneskilled in the art will recognize, that if the bindtype is oneTime, thebinding engine does not listen for source property change events. Thus,in actual practice, the logic within the binding engine does notnecessarily perform a check as shown in block 310. In addition, if thedata item does not implement IPropertyChange, processing is complete.If, however, the bindtype is not oneTime, processing continues at block312.

[0039] At block 312, the binding engine listens for notificationsassociated with the bindings. Because databinding does not directlyupdate the target with the source data value, the present inventionimplements a notification mechanism. Notification mechanisms, such asproperty change notifications and collection view “CurrentChanged”notifications and the like, are known in the art and need not bediscussed at length here. Different actions cause a notification, suchas a data value change, a page navigation, shutdown, change in record ofinterest in a data collection, and the like. Because the presentinvention triggers an update upon a change in the record of interest ina data collection, the present invention provides a convenient mechanismfor further de-coupling the user interface and the logic. For example,in accordance with the present invention, the developer only needs towrite code in the logic to specify how to change to the next record ofinterest in a data collection. Once the change occurs, the bindingengine, in accordance with the present invention, will update the userinterface according to the bindings already specified. As mentionedbefore, this de-coupling of the user interface and the logic provides amore robust and more easily maintained application than when the userinterface and logic are intertwined.

[0040] The following code is one exemplary implementation for thenotification mechanism. While the exemplary code written below iswritten in C#, those skilled in the art will appreciate that variouslanguages and syntax may be used to implement the notificationmechanism. For any such implementation, an interface is defined for useby each data item. Each data item inherits this interface in order toimplement dynamic updating. Public interface IPropertyChange { eventPropertyChangedEventHandler PropertyChanged; }.

[0041] Next, an event handler and its arguments are defined. publicdelegate void PropertyChangedEventHandler(object sender,PropertyChangedEventArgs e); public class PropertyChangedEventArgs :EventArgs { public virtual string PropertyName { get;} }.

[0042] The class PropertyChangedEventArgs includes one read-onlyproperty named PropertyName having a type string. The PropertyNameproperty contains a name for the property which has changed. Each sourcedata item then implements this interface by calling the PropertyChangeddelegate whenever one of its properties has changed. The following is anillustrative example for implementing a source object (e.g., data item232) in accordance with the embodiment for the notification mechanism.public class myClass : IPropertyChange { private string foo = “HelloWorld”; public string Foo { get { return foo; } set { if(foo != value) {foo = value; NotifyPropertyChanged(“foo”); } } public eventPropertyChangedEventHandler Property Changed; private voidNotifyPropertyChanged(string propName) { PropertyChanged(this, newPropertyChangedEventArgs(propName)); } }.

[0043] As shown above in the exemplary code, the ‘set’ method for the‘foo’ property determines whether a new value is different than the oldvalue. If the values differ, the handler is called. In anotherrefinement, an empty string may be passed in the arguments to signalthat all bindings to each of the data item's data values should beupdated. This may occur when the source object is not certain aboutwhich properties have changed and would like each binding updated. Oncethe binding engine receives a notification that the data source valuehas changed, processing continues at decision block 314.

[0044] At decision block 314, a determination is made whether thebinding associated with the source data value that changed specified atransform for the binding. If the binding does not specify a transform,processing continues at block 318. However, if the binding does specifya transform, processing continues at block 316.

[0045] At block 316, the transform that is specified in the binding isperformed. In one embodiment, transformer 268 is an object as describedbelow: Public interface IDataTransformer { object Transform(object o,DependencyProperty dp, CultureInfo culture); objectInverseTransform(object o, PropertyInfo info, CultureInfo culture); }.

[0046] For the above interface, o denotes the source value, dp denotesthe target dynamic property, and culture denotes the culture to useduring the transformation. The Transform( ) method transforms the sourcevalue o into an object suitable for assignment to the property denotedby dp. The Transform( ) method is called when propagating a data valuefrom the source of a binding to the target property. If the Transform( )method returns a value of null, the binding engine is signaled to stoppropagating values.

[0047] The transformer may also be used for controlling other UIproperties, such as width, height, font, positioning(x,y), and the likebased on the associated source data value specified in the binding.Transformers provide the ability to perform logic on the data value inorder to show the data in several ways. In a further refinement, aculture may be applied during the transform as specified in the binding.Processing continues at block 318.

[0048] At block 318, the target property is updated. In one embodiment,the property engine assigns the value to the target property. Inaddition, the target property may be marked as having a new value.Processing may then continue to block 312 and listen for the nextproperty change notification associated with the binding. Once theapplication ends or the binding is otherwise terminated, processingproceeds to the end.

[0049] As mentioned above, from block 308, processing may continuethrough a second path. Thus, from block 308, processing continues atdecision block 330. As mentioned above regarding decision block 310, thelogic within the binding engine may not necessarily perform a check ofthe bindtype during decision block 310, but rather, because the bindingengine was not told to listen for notifications when the binding wascreated, the process does not flow through the second path. However, forclarity in describing the flow, a decision block reflecting the bindtypeis shown. Therefore, at decision block 330, a determination is madewhether the binding specified twoWay as the bindtype. As discussedearlier, twoway allows changes in the target property to be propagatedto the source data value. If the binding does not specify twoWay as thebindtype, processing proceeds to the end. However, if the binding doesspecify twoWay as the bindtype, processing continues at block 332.

[0050] At block 332, the binding engine will recognize certain actionsthat trigger an update to the source data value. Once a trigger occurs,processing continues at decision block 334.

[0051] At decision block 334, a determination is made whether thebinding specifies an inverse transform for the binding. If the bindingdoes not specify an inverse transform, processing continues at block338. However, if the binding does specify an inverse transform,processing continues at block 336.

[0052] At block 336, the inverse transform is applied to the sourceproperty. In one embodiment, the inverse transformer is an object asdescribed above in reference to the Public interface IDataTransformer.

[0053] For the above interface, o denotes the source value, culturedenotes the culture to use during the transformation, and info denotesthe PropertyInfo of the target property. The InverseTransform( ) methodtransforms the source value o into an object suitable for assignment toa property of type info. This method is called when propagating a valuefrom the target of a binding to the source. If the InverseTransform( )method returns a value of null, the binding engine does not propagate avalue. Once the InverseTransform is performed, processing continues atblock 338.

[0054] At block 338, the source property is updated according to theudpatetype. As described above, the updatetype may be immediate, on lossof focus, explicit, and others. Once the source property is updated,processing proceeds to the end.

[0055]FIG. 4 illustrates several exemplary means for creating a binding.Creation means 400-410 creates the binding through markup. Creationmeans 410 creates the binding through code. The illustrative means shownin FIG. 4 are not exhaustive. Other means (syntax) may be used withoutdeparting from the scope of the present invention.

[0056] Creation means 400 includes a DataContext name/value pair(hereinafter referred to as DataContext 422) and Id name/value pair(hereinafter referred to as Id 420) for an element 424. Because creationmeans 400 also includes DataContext 422, Id 420 is unnecessary. Id 420is needed when it is desirable to refer to an explicit source, such asusing ElementSource in markup or an IdObjectRef within code. Both ofthese uses are described below. DataContext 422 is a dynamic propertydefined on an element (e.g., element 424). The value associated withDataContext 422 represents the default source data item and is aninheritable property. The binding engine queries DataContext 422 andutilizes DataContext 422 when creating a binding for element 424 anddescendent elements (e.g., Button element 426). The binding engine alsolistens for changes to DataContext 422, which triggers an updateaccordingly. Thus, while not required, DataContext 422 provides aconvenient mechanism for establishing scope for all properties bound toa common data item. Descendant elements may have their own DataContext,which will take precedence over the DataContext 422 of the parentelement. A binding may override DataContext 422 by supplying a non-nullSource, described below in conjunction with creation means 402.

[0057] Button element 426 is illustrated with a target property (e.g.,Button.Content 428). In accordance with the present invention, uponencountering “Data:Bind”, the binding engine recognizes that a bindingis being specified. Name/value pairs that follow, set the bindingproperties 260-272 as specified in FIG. 2. One skilled in the art willappreciate that the terms “Data:Bind” to signal a binding is anarbitrary term and any number of terms may have been used withoutdeparting from the present invention. Creation means 400 represents averbose markup format.

[0058] Creation means 402 represents a compact markup format. The UIproperty (e.g., Button Text) is represented in a more compact fashion.Again, “Data:Bind” is used as a signal to the binding engine that whatfollows is a binding. Also, the name/value pairs following Data:Bindcorrespond to the desired properties 260-272 described earlier for thebinding object 250 in FIG. 2. For example, ElementSource name/value pair(hereinafter referred to as ElementSource 434) corresponds to source266.

[0059] In markup, there are two methods for setting the source property:ElementSource and DataSource. If neither of these is used, the defaultvalue for source is null which signals the binding engine, uponcreation, to get the value of the element's DataContext property and usethe value as the source object.

[0060] When a creation means (e.g., creation means 402) specifies anElementSource, the binding engine finds the element whose ID isspecified by the ElementSource property. That element's DataContext isthen used as the source object. Relative pathnames, such as/Parent/Parent and /Previous/Previous, may be used to specify thedatasource. When the binding engine encounters /Parent, it looks for theelement parent to the current element in terms of object hierarchy. Forexample, if the element is a customer order, specifying /Parent maysignal the binding engine to look for the element which corresponds to acustomer for the current order. Specifying/Parent is useful in nestedrepeater cases in which it is desirable to use values from an outerrepeater in the scope of an inner repeater. Specifying /Previous signalsthe binding engine to look for the element previous to the currentelement under the Repeater. Specifying/Previous is useful when it isdesirable to access the current-n item in addition to the current item,such as in line graphs and the like. Successive /Previous and /Parentmay be used in accordance with the present invention.

[0061] In another embodiment, markup may specify a DataSource. When aDataSource is specified, the binding engine accepts the resource id of aResource. If the Resource exposes a data property, then the bindingengine will set the Source of the binding to the object returned by thedata property of the DataSource resource. Otherwise, the binding enginewill set the source of the binding to the resource object itself.

[0062] Those skilled in the art will appreciate that there are variousways in which properties 260-272 may be expressed using a markuplanguage, and therefore, the manner in which each of these otherproperties may be expressed using a markup language is not explained infurther detail herein.

[0063] The next three creation means 404-410 provide illustrativeexamples on the type of items that the present invention may bind.Creation means 404 illustrates support of binding to sub-properties andindexers. Creation means 404 corresponds to a binding written in C# asdi.a.b[3].c, wherein di is the relevant data item. As long as the dataitem, the class that implements di.a, the class that implements di.a.b,and the class that implements di.a.b[3].c all support the notificationmechanism of the present invention (e.g., IPropertyChange) and notifywhen their properties change, the binding specified using creation means404 will cause the binding engine to automatically update the boundproperty (e.g., the target property) to reflect changes in the sourcedata value.

[0064] Creation means 406 illustrates support of binding to a datacollection. The binding engine will automatically use the current recordof the collection at each level (wherein a, b, and c represent differentlevels). For example, if di.a has a type IDataCollection, the bindinguses the current record of the collection to fetch the “b” property.Thus, the binding engine automatically updates values associated with adata collection whenever the current record is changed.

[0065] Creation means 408 illustrates support of binding to XML node.The path 260 to the value is supplied using an XPath expression, such as“/Customer/Order[@OrderID=10]/Amount)”, as shown in FIG. 4. Creationmeans 410 illustrates support of binding to ADO data tables. For thisimplementation, the path 260 to the value is supplied as a field namefor a particular row, such as “OrderID”, as shown in FIG. 4.

[0066] Creation means 410 creates the bindings programmatically. Thedeveloper provides an objectref to the object that the binding shoulduse as the source data item. The program statements shown in creationmeans 412 create a binding with the same behavior as the one illustratedby creation means 410. The SetBinding method has a number of moreelaborate variants by which the programmer can specify any of thebinding properties discussed above. The simple example above uses thebutton's DataContext as the source object. The following programstatements create a one-way binding that uses a specific object (knownat runtime) as the source: Object source = ... some arbitrary object ...; Binding.SetBinding(myButton, Element.BackgroundProperty, “Color”,BindType.OneWay, new ExplicitObjectRef(source));

[0067] The following exemplary program statements may also be used:

[0068] myButton.SetBinding(Button.BackgroundProperty, “Color”,BindType.OneWay, new ExplicitObjectRef(source));

[0069] The following example code displays one implementation forcontrolling a user interface property with data via the bindingmechanism of the present invention. In this example, the data value(e.g., myinteger) and the UI property (e.g., TextContent) are activatedas a binding. In addition, a transform (e.g., MyTranformer) is specifiedfor this binding. <Test TextContent=“*Data:Bind(Path=myInteger)”Foreground=“*Data:Bind(Path=MyInteger;Transformer= MyTransformer)”/>public class MyTransformer : IDataTransformer { public objectTransform(object o, DependencyProperty dp, CultureInfo culture) {if((int)o <0) return Red; else return Black; } public objectInverseTransform(object o, PropertyInfo info, CultureInfo culture) {return null; } }. The following exemplary code may also be used:<Element.Resources> <MyTransformer def:Name=“xform”/><Element.Resources> <SimpleText Text=“ *Bind(Path=myInteger)”Foreground=“*Bind(Path=myInteger; Transformer={xform})” />

[0070] Exemplary APIs

[0071] System.Windows.Data

[0072] This namespace includes classes and interfaces used for bindingproperties to data sources, data source classes, data-specificimplementations of collections and views, and handling exceptions indata entry. The following list the members exposed by theSystem.Windows.Data namespace.

[0073] Classes

[0074] ArrayListCollectionView encapsulates the collection view supportfor the ArrayListDataCollection collection class. This class cannot beinherited.

[0075] ArrayListDataCollection provides a built-in implementation of anarray-list data collection with an underlying collection-view interface.It also implements ICollectionChange to provide notification when itemsare added, items are removed, or the whole collection is refreshed.

[0076] Bind Represents a bind declaration object, used to managebindings between a dynamic property user interface (UI) and source data.

[0077] Binding Provides access to the single run-time instance of abinding. This class cannot be inherited.

[0078] BindingListCollectionView—A collection view class used forMicrosoft® ActiveX® Data Objects (ADO) data views.

[0079] CollectionContainer—Objects of this class hold an existingcollection structure—for example, an ArrayListDataCollection or someother DataSet inside the ItemCollection.

[0080] ContextAffinityCollectionView—Implements a collection view thatincludes checks for context affinity.

[0081] DataContextObjectRef—Supports object references to elements whoseDataContext is being used as the source for a binding. This class cannotbe inherited.

[0082] DataSourceObjectRef—Supports object references to data sources.This lass cannot be inherited.

[0083] DataTransferEventArgs—Encapsulates arguments for data transfervents. The events are routed events that must typically be handledspecifically by a designated handler based on theDataTransferEventHandler delegate.

[0084] ElementObjectRef—Represents an object reference to an element,with the object being specified by its element ID. This class cannot beinherited.

[0085] ExplicitObjectRef—Represents an object reference to an explicitobject. This class cannot be inherited.

[0086] ListCollectionView—Implements a collection view for collectionsbased on IList.

[0087] ObjectDataSource—Serves as a data source for data binding.Bindable data items can be specified as common language runtime types.

[0088] ObjectRef—The abstract class that is used as the parent class ofDataContextObjectRef, ElementObjectRef, ExplicitObjectRef, andTypeObjectRef.

[0089] ParameterCollection—Objects of this class hold the collection ofnamed parameters (with their corresponding values) for an SqlDataSource.

[0090] QueryCommand—This class represents a single select statement tobe submitted to the database.

[0091] RefreshCompletedEventArgs—Encapsulates the arguments passedeither in the RefreshCompleted event of ObjectDataSource, or in theRefreshCompleted event of XmlDataSource.

[0092] SqlCommandList—A list of sql commands and the names of the tablesthat they should be used to fill.

[0093] SqlDataSource—SqlDataSource gets data from a Microsoft SQL Serverfor use in databinding.

[0094] TransformerSource—Allows resource reference to a transformerclass that is defined as code-behind in the current application.

[0095] TypeObjectRef—Supports object reference by type. This classcannot be inherited.

[0096] WinFSDataSource—The WinFSDataSource facilitates databinding ofdata stored in WinFS with Avalon applications

[0097] XmlDataNamespaceManager—XmlDataNamespaceManager Class Used todeclare namespaces to be used in Xml data binding XPath queries

[0098] XmlDataSource—Serves as a data source for data binding toExtensible Markup Language (XML) content nodes.

[0099] XmlNamespace—Declares an individual namespace within an XML datasource.

[0100] Interfaces

[0101] IContains—Used to create classes that declare filtering criteriafor collection views.

[0102] IDataSource—Supports creation of data source objects. Data sourceobjects are used for common representation of data for data binding.

[0103] IDataTransformer—Provides methods that enable client-sidetransformation of bound data.

[0104] Enumerations

[0105] BindFlags—Describes special properties of a binding.

[0106] BindStatus—Status of a Binding.

[0107] BindType—Describes how changes in data values will transfer toand from source properties and target properties of a binding.

[0108] SqlDataSourceMode—The enumeration of the possible modes thatSqlDataSource can have. The mode determines what sort of data isreturned when the application retrieves the value from the Dataproperty.

[0109] UpdateType—Specifies when updates to the data source(target-to-source data transfer) should occur in a binding. Settingthese values will only be relevant if a binding's BindType is set toTwoWay (or defaults to TwoWay).

[0110] Delegates

[0111] DataChangedEventHandler—Represents the method that handles theDataChanged event raised by data sources that implement IDataSource.

[0112] DataTransferEventHandler—Represents the method that handles adata transfer event raised by Binding.

[0113] RefreshCompletedEventHandler—Represents the method that handlesthe ObjectDataSource.RefreshCompleted and XmlDataSource.RefreshCompletedevents. class sealed System.Windows.Data.ArrayListCollectionView :ListCollectionView : ContextAffinityCollectionView : CollectionView :Object Implements: IEnumerable ICollectionChange ICurrentItem IComparer{ protected virtual Void OnCollectionChanged(Object sender,CollectionChangeEventArgs args) protected virtual IListPrepareLocalArray(IList list) } classSystem.Windows.Data.ArrayListDataCollection : ArrayList : ObjectImplements: IList ICollection IEnumerable ICloneable ICollectionChangeICollectionViewFactory { public virtual Int32 Add(Object newItem) publicvirtual Void AddRange(ICollection range) public virtual Void Clear( )public virtual sealed CollectionView CreateView( ) public virtual VoidInsert(Int32 index, Object insertItem) public virtual VoidInsertRange(Int32 index, ICollection c) public virtual VoidRemove(Object removeItem) public virtual Void RemoveAt(Int32 index)public virtual Void RemoveRange(Int32 index, Int32 count) public virtualVoid Reverse( ) public virtual Void SetRange(Int32 index, ICollection c)public virtual Void Sort( ) }

[0114] Represents a bind declaration object, used to manage bindingsbetween a dynamic property user interface (UI) and source data.

[0115] BeginDefer—Begins a defer cycle. Defer cycles are used to batchmultiple bind declaration changes and improve performance.

[0116] Bind—Initializes a new instance of the Bind class. The Bindobject represents the bind declaration of a binding.

[0117] EndDefer—Ends a defer cycle and updates the binding with theaccumulated declaration changes made to the Bind declaration object.

[0118] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0119] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0120] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0121] GetType—Gets the Type of the current instance. Inherited fromObject.

[0122] IApplyValue.Apply—Applies the value to a property of an element.In this class, this method is not intended to be called directly.

[0123] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0124] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0125] ToString—Returns a String that represents the current Object.Inherited from Object.

[0126] Properties

[0127] BindFlags—Gets or sets the flags that describe the binding.

[0128] BindType—Gets or sets the type of the binding.

[0129] Culture—Gets or sets the Cultureinfo to use in a transformerassociated with the binding (which may be the default transformer, ifthe Transformer property is not specifically set on the Bind object).

[0130] DataContextSource—Gets or sets the reference to another elementthat this element should use as source for the binding's data context.

[0131] DataSource—Gets or sets the object reference to the data sourceof the binding.

[0132] ElementSource—Gets or sets a string naming the identifier (ID) ofanother element in the application that should be used as the datasource for the binding.

[0133] ObjectSource—Gets or sets the object reference to the data sourceof the binding.

[0134] Path—Gets or sets the description or name of the desired dataproperty in the source, or an XPath query to desired data if the bindingis to Extensible Markup Language (XML) data.

[0135] Source—Gets or sets the source object of the binding, as aspecial object reference object.

[0136] Transformer—Gets or sets a reference to the transformer to applyto the bound property.

[0137] UpdateType—Gets or sets the update type used in this binddeclaration.

[0138] The Bind class is used to create and maintain the binddeclaration. The declaration establishes the various base propertiesrequired for a typical binding, such as the source property, the type ofthe binding's update relationship of source vs. bound data, and othercharacteristics of a particular binding.

[0139] A Bind object's properties can be manipulated after the bindinghas been established, using C# calls to properties.

[0140] Properties of the Bind class closely parallel the *Bind syntaxused for establishing a bind declaration in a particular markup language(named “XAML”).

[0141] Bind to a Property

[0142] This example describes how to bind to a property using “XAML”.

[0143] All bindings include the following:

[0144] Target element

[0145] Target dynamic property

[0146] Source object

[0147] Source property

[0148] In this case, the BoundColor property is the source property,myData is the source object, Button is the target element, andBackground is the target property. <DockPanel ID=“root”xmlns=“http://schemas.microsoft.com/2003/xaml” xmlns:def=“Definition” ><DockPanel.Resources> <ObjectDataSource def:Name=“myDataSource”TypeName=“WCPSample.myData,BindNonTextPropertySample” /></DockPanel.Resources> <DockPanel> <DockPanel.DataContext> <BindDataSource=“{myDataSource}”/> </DockPanel.DataContext> <ButtonBackground=“*Bind(Path=BoundColor;BindType= OneWay)” Width=“200”Height=“30”>I am RED!</Button> </DockPanel> </DockPanel> Create aBinding

[0149] This example shows how to create a binding in C#. To do this, youattach the binding object for the SampleText source property in data tothe Text property of the SimpleText element, mytext.

[0150] When calling the Bind constructor, you can pass the source objectthrough the ExplicitObjectRef constructor to get an ObjectRef object.There are many possible signatures both for the Bind constructor and forthe SetBinding convenience method, and it is even possible to create theentire binding with the convenience method without calling the Bindconstructor at all, but this example splits the operation into theconstructor piece and then the specific setting of that bind declarationon an individual property of an element. If you do this in two steps,then the bind declaration created as the intermediate can be reused forbinding to more than one element in your application. public voidCreateBinding( ) { myDataObject = new myData(System.DateTime.Now);myBindDef = new Bind(“MyDataProperty”, BindType.TwoWay, newExplicitObjectRef(myDataObject));mytext.SetBinding(SimpleText.TextProperty, myBindDef); ... } classsealed System.Windows.Data.Bind : Object Implements: IApplyValue {public Void BeginDefer( ) public Void EndDefer( ) public BindFlagsget_BindFlags( ) public BindType get_BindType( ) public CultureInfoget_Culture( ) public String get_DataContextSource( ) public Objectget_DataSource( ) public String get_ElementSource( ) public Objectget_ObjectSource( ) public String get_Path( ) public ObjectRefget_Source( ) public IDataTransformer get_Transformer( ) publicUpdateType get_UpdateType( ) virtual sealed VoidSystem.Windows.IApplyValue.Apply(DependencyObject target,DependencyProperty dp) public Void set_BindFlags(BindFlags value) publicVoid set_BindType(BindType value) public Void set_Culture(CultureInfovalue) public Void set_DataContextSource(String value) public Voidset_DataSource(Object value) public Void set_ElementSource(String value)public Void set_ObjectSource(Object value) public Void set_Path(Stringvalue) public Void set_Source(ObjectRef value) public Voidset_Transformer(IDataTransformer value) public Voidset_UpdateType(UpdateType value) } enum sealedSystem.Windows.Data.BindFlags : Enum : ValueType : Object Implements:IComparable IFormattable IConvertible { public static BindFlagsNotifyOnTransfer }

[0151] Get the Bind Declaration Object of a Binding Expression

[0152] Provides access to the single run-time instance of a binding.This class cannot be inherited.

[0153] Method Description

[0154] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0155] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0156] GetDataContext—Returns a data context. This method is a staticaccessor for a given binding's data context object.

[0157] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0158] GetSources—Returns an array list of sources for the originalbinding expression.

[0159] GetType—Gets the Type of the current instance. Inherited fromObject.

[0160] GetValue—Returns the evaluated value of a binding expression.This method is intended to be called statically.

[0161] GetView—Returns collection views of the data in the binding.

[0162] GetXmlNamespaceManager—Returns an Extensible Markup Language(XML) namespace manager object used by the binding attached to theprovided element.

[0163] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0164] OnAttach—Handles the notification that a binding expression hasbeen set as a property's value. This method is called statically, butgenerally is not used by application code.

[0165] OnDetach—Handles the notification that a binding expression hasbeen removed as a property's value. This method is called statically,but generally is not used by application code.

[0166] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0167] SetDataContext—Sets the data context of a binding for a givenobject/property combination. This method is intended to be calledstatically.

[0168] SetValue—Sets the value of a binding. Returns a value thatindicates whether the given value could be accepted. This method isintended to be called statically.

[0169] SetXmlNamespaceManager—Sets a namespace manager object used bythe binding attached to the provided element.

[0170] ToString—Returns a String that represents the current Object.Inherited from Object.

[0171] Update—Propagates the current value of the target property of abinding back to the source object.

[0172] Property Description

[0173] DataItem—Gets the data item currently in use by the binding. Thiscould be a single object, or a collection, depending on the pathconditions that established the binding.

[0174] DataSource—Gets the source of the binding, as a data sourceobject. This might be an element from within the application or markup,or an external object that is specified as the data source resource.

[0175] ParentBind—Gets the Bind declaration object from which thisBinding derived.

[0176] Status—Gets the status of a Binding.

[0177] Field Description

[0178] DataContextProperty—Declares the DependencyProperty for abinding's data context so that it can be set as a property in the *Bindsyntax.

[0179] DataTransferEventID—A field that is used to identify the routingidentifier (ID) for data transfer events. Reference this fieldstatically.

[0180] XmlNamespaceManagerProperty—Declares the DependencyProperty for abinding's XML namespace manager, so that it can be set as a property inthe *Bind syntax.

[0181] This class can be used to get the Bind Declaration Object of aBinding Expression, get the Status of a Binding, and control Updates toData Bindings.

[0182] A related class, Bind, provides access to the bind declaration.The bind declaration is where you specify the property or path used inthe binding and other declarations. The declaration can be specifiedeither as properties of Bind or by using the bind declaration syntax inmarkup when first setting a DataContext on an element.

[0183] A Binding object can be obtained through the return value ofcalling GetBinding on a data bound object.

[0184] Get the Bind Declaration Object of a Binding Expression

[0185] The following C# example shows how to obtain the bind declarationobject associated with a binding, by using the binding's target elementand property. Having the bind declaration object available is usefulbecause you may want to set or get properties that are carried in thedeclaration. Also, you could use this same declaration to qualify muchof the bind declaration information needed for a totally differentbinding using the same data. To get the Bind declaration object, youneed to get the Binding for a specified property on a target element.Then get the ParentBind property of the Binding object. BindingmyBinding = mytext.GetBinding(SimpleText.TextProperty);if(myBinding!=null) { Bind myBindDec; myBindDec = myBinding.ParentBind;... //now change properties of the bind declaration, or re-use it foranother binding } class sealed System.Windows.Data.Binding : Expression: Object { public Object get_DataItem( ) public Object get_DataSource( )public Bind get_ParentBind( ) public BindStatus get_Status( ) publicstatic Object GetDataContext(DependencyObject d) public virtualDependencySource[ ] GetSources( ) public virtual ObjectGetValue(DependencyObject d, DependencyProperty dp) public staticCollectionView GetView(Object collection) public static CollectionViewGetView(Object collection, String name) public static ObjectGetXmlNamespaceManager(DependencyObject d) public virtual VoidOnAttach(DependencyObject d, DependencyProperty dp) public virtual VoidOnDetach(DependencyObject d, DependencyProperty dp) public static VoidSetDataContext(DependencyObject d, Object value) public virtual BooleanSetValue(DependencyObject d, DependencyProperty dp, Object value) publicstatic Void SetXmlNamespaceManager(DependencyObject d,XmlNamespaceManager value) public Void Update( ) public staticreadonlyDependencyProperty DataContextProperty public staticreadonlyRoutedEventID DataTransferEventID public staticreadonlyDependencyProperty XmlNamespaceManagerProperty } enum sealedSystem.Windows.Data.Binding+BindStatus : Enum : ValueType : ObjectImplements: IComparable IFormattable IConvertible { public staticBindStatus Active public static BindStatus Detached public staticBindStatus Inactive public static BindStatus NoDataItem public staticBindStatus PathError }

[0186] A collection view class used for Microsoft® ActiveX® Data Objects(ADO) data views.

[0187] Event Description

[0188] CollectionChanged occurs when the collection view changes. Thiscould mean that items were added or removed in the collection, or that anew sort or filter was applied to this view. Inherited fromCollectionView.

[0189] CurrentChanged occurs immediately after the record pointerposition moves.

[0190] CurrentChanging occurs when a request is made to move the currentrecord pointer. The requested move can be canceled by setting a handlerand using the CancelEventArgs object within arguments of the event tocancel the event.

[0191] ProtectedCurrentChanged—A protected event. In derived classes,this event occurs after changing the position of the record pointer.Inherited from CollectionView.

[0192] ProtectedCurrentChanging—A protected event. In derived classes,this event occurs before a change in currency. If necessary, handlers ofthe event can cancel the change. Inherited from CollectionView.

[0193] Method Description

[0194] BindingListCollectionView—Initializes a new instance of theBindingListCollectionView class.

[0195] ChangedCurrent—Raises the implemented CurrentChanged event of theobject. Inherited from CollectionView.

[0196] CheckUiContextAccess—Determines whether the calling thread isactive within the context this collection view is bound to. Inheritedfrom ContextAffinityCollectionView.

[0197] Compare—Return—, 0, or +, according to whether o1 occurs before,at, or after o2 (respectively)

[0198] Contains—Return true if the item belongs to this view. The itemis assumed to belong to the underlying DataCollection; this methodmerely takes filters into account. It is used during collection-changednotifications, for instance.

[0199] ContainsItem—Return true if the item belongs to this view. Noassumptions are made about the item. If the caller knows that the itembelongs to the underlying collection, it is more efficient to callContains.

[0200] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0201] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0202] GetEnumerator—Implementation of IEnumerable.GetEnumerator( ).This provides a way to enumerate the members of the collection withoutchanging the currency.

[0203] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0204] GetType—Gets the Type of the current instance. Inherited fromObject.

[0205] IndexOf—Return the index where the given item belongs

[0206] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0207] MoveFirst—Move Current to the first item.

[0208] MoveLast—Move Current to the last item.

[0209] MoveNext—Move Current to the next item.

[0210] MovePrevious—Move Current to the previous item.

[0211] MoveTo—Move Current to the given item.

[0212] OKToChangeCurrent—Determines whether it is allowable to changethe position of the current record pointer. Inherited fromCollectionView.

[0213] OnCollectionChanged—Implement this method to handleCollectionChanged events in the data collection that underlies thecollection view. Inherited from CollectionView.

[0214] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0215] Refresh—Refreshes the view. Re-applies any current sort or filteroperations, as set by various properties that declare sort or filtercriteria.

[0216] ToString—Returns a String that represents the current Object.Inherited from Object.

[0217] VerifyUiContextAccess—Verifies that the calling thread is activewithin the context that this collection view is bound to. If not, anexception is raised. Inherited from ContextAffinityCollectionView.

[0218] Property Description

[0219] BOF—Return true if Current is before the beginning(Beginning-Of-File).

[0220] CanFilter—Gets a value that declares whether this view can befiltered on the basis of its Filter property. Inherited fromCollectionView.

[0221] CanSort—Test if this CollectionView supports sorting beforeassigning a non-null value to Sort.

[0222] Collection—Gets the underlying data collection object. Inheritedfrom CollectionView.

[0223] Comparer—Gets the comparison object being used by the collectionview. Inherited from CollectionView.

[0224] Count—Return the estimated number of records (or −1, meaning“don't know”).

[0225] Current—Return current item.

[0226] CurrentItem—Gets the current object in the data collection, byreturning an object that implements a Current property as well asseveral other methods for moving or checking currency. Inherited fromCollectionView.

[0227] EOF—Return true if Current is beyond the end (End-Of-File).

[0228] Filter—Gets or sets the filter applied to the data in a datacollection view. Inherited from CollectionView.

[0229] Sort—Gets or sets the sort descriptions that apply a sort orderto the collection.

[0230] UIContext—Gets the user interface (UI) context that thiscollection view is bound to. Inherited fromContextAffinityCollectionView.

[0231] ViewManagerData Gets implementation data about a view. Inheritedfrom CollectionView. class sealed System.Windows.Data.BindingListCollectionView ContextAffinityCollectionView :CollectionView : Object Implements: IEnumerable ICollectionChangeICurrentItem IComparer { public virtual sealed Int32 Compare(Object o1,Object o2) public virtual Boolean Contains(Object item) public virtualBoolean ContainsItem(Object item) public virtual sealed Boolean get_BOF() public virtual Boolean get_CanSort( ) public virtual Int32 get_Count() public virtual sealed Object get_Current( ) public virtual sealedBoolean get_EOF( ) public virtual SortDescription[ ] get_Sort( ) publicvirtual IEnumerator GetEnumerator( ) public virtual Int32 IndexOf(Objectitem) public virtual sealed Boolean MoveFirst( ) public virtual sealedBoolean MoveLast( ) public virtual sealed Boolean MoveNext( ) publicvirtual sealed Boolean MovePrevious( ) public virtual sealed BooleanMoveTo(Object item) public virtual Void Refresh( ) public virtual Voidset_Sort(SortDescription[ ] value) } enum sealedSystem.Windows.Data.BindType : Enum : ValueType : Object Implements:IComparable IFormattable IConvertible { public static BindType OneTimepublic static BindType OneWay public static BindType Two Way }

[0232] Implements a collection view that includes checks for contextaffinity.

[0233] Event Description

[0234] CollectionChanged—Occurs when the collection view changes. Thiscould mean that items were added or removed in the collection, or that anew sort or filter was applied to this view. Inherited fromCollectionView.

[0235] ProtectedCurrentChanged—A protected event. In derived classes,this event occurs after changing the position of the record pointer.Inherited from CollectionView.

[0236] ProtectedCurrentChanging—A protected event. In derived classes,this event occurs before a change in currency. If necessary, handlers ofthe event can cancel the change. Inherited from CollectionView.

[0237] Method Description

[0238] ChangedCurrent—Raises the implemented CurrentChanged event of theobject. Inherited from CollectionView.

[0239] CheckUiContextAccess—Determines whether the calling thread isactive within the context this collection view is bound to.

[0240] Contains—Determines whether a given data item belongs to thiscollection view. Inherited from CollectionView.

[0241] ContainsItem—Determines whether a given data item belongs to thiscollection view or the unfiltered collection. Inherited fromCollectionView.

[0242] ContextAffinityCollectionView—Create a view to given collection.

[0243] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0244] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0245] GetEnumerator—Returns an enumerator that can iterate through thecollection view. Inherited from CollectionView.

[0246] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0247] GetType—Gets the Type of the current instance. Inherited fromObject.

[0248] IndexOf—Returns the index where the given data item belongs inthe collection, or −1 if the index of that item is unknown. Inheritedfrom CollectionView.

[0249] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0250] OKToChangeCurrent—Determines whether it is allowable to changethe position of the current record pointer. Inherited fromCollectionView.

[0251] OnCollectionChanged—Implement this method to handleCollectionChanged events in the data collection that underlies thecollection view. Inherited from CollectionView.

[0252] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0253] Refresh—Refreshes the view. Reapplies any current sort or filterconditions, as set by various properties that declare sort or filtercriteria. Inherited from CollectionView.

[0254] ToString—Returns a String that represents the current Object.Inherited from Object.

[0255] VerifyUiContextAccess—Verifies that the calling thread is activewithin the context that this collection view is bound to. If not, anexception is raised.

[0256] Property Description

[0257] CanFilter—Gets a value that declares whether this view can befiltered on the basis of its Filter property. Inherited fromCollectionView.

[0258] CanSort—Gets a value that declares whether the collection can besorted on basis of its Sort property. Inherited from CollectionView.

[0259] Collection —Gets the underlying data collection object. Inheritedfrom CollectionView.

[0260] Comparer—Gets the comparison object being used by the collectionview. Inherited from CollectionView.

[0261] Count—Gets the count of records in the collection. Inherited fromCollectionView.

[0262] CurrentItem—Gets the current object in the data collection, byreturning an object that implements a Current property as well asseveral other methods for moving or checking currency. Inherited fromCollectionView.

[0263] Filter—Gets or sets the filter applied to the data in a datacollection view. Inherited from CollectionView.

[0264] Sort—Gets or sets the sort order within the data collection view.Inherited from CollectionView.

[0265] UIContext—Gets the user interface (UI) context that thiscollection view is bound to.

[0266] ViewManagerData—Gets implementation data about a view. Inheritedfrom CollectionView. abstract classSystem.Windows.Data.ContextAffinityCollectionView : CollectionView :Object Implements: IEnumerable ICollectionChange { protected BooleanCheckUiContextAccess( ) protected UIContext get_UIContext( ) protectedVoid VerifyUiContextAccess( ) } class sealedSystem.Windows.Data.DataChangedEventHandler : MulticastDelegate :Delegate : Object Implements: ICloneable ISerializable { public virtualIAsyncResult BeginInvoke(Object sender, EventArgs args, AsyncCallbackcallback, Object object) public virtual Void EndInvoke(IAsyncResultresult) public virtual Void Invoke(Object sender, EventArgs args) }

[0267] Supports object references to elements whose DataContext is beingused as the source for a binding. This class cannot be inherited.

[0268] Method Description

[0269] DataContextObjectRef Initializes a new instance of theDataContextObjectRef class.

[0270] Equals Determines whether two Object instances are equal.Inherited from Object.

[0271] Finalize Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0272] FindRootElement—Finds the root element for a given element.Inherited from ObjectRef.

[0273] GetDataObject—Returns the object that established data contextfor the specified object.

[0274] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0275] GetObject—Returns the object that established data context forthe specified object.

[0276] GetType—Gets the Type of the current instance. Inherited fromObject.

[0277] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0278] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0279] ToString—Returns a String that represents the current Object.Inherited from Object. class sealedSystem.Windows.Data.DataContextObjectRef: ObjectRef : Object { publicvirtual Object GetDataObject(DependencyObject d) public virtual ObjectGetObject(DependencyObject d) } class sealedSystem.Windows.Data.DataSourceObjectRef : ObjectRef : Object { publicvirtual Object GetDataObject(DependencyObject d) public virtual ObjectGetObject(DependencyObject d) }

[0280] Encapsulates arguments for data transfer events. The events arerouted events that must typically be handled specifically by adesignated handler based on the DataTransferEventHandler delegate.

[0281] Property Description

[0282] Handled—Sets or retrieves a value that indicates the presentstate of the event handling. Inherited from RoutedEventArgs.

[0283] OriginalSource—Returns OriginalSource object that raised theRoutedEvent. Inherited from RoutedEventArgs.

[0284] Property—Gets the specific property that changed and caused thedata transfer event to be raised.

[0285] RoutedEventID—Returns the RoutedEventID associated with thisRoutedEventArgs. Inherited from RoutedEventArgs.

[0286] Source—Gets the object that raised the event. Inherited fromRoutedEventArgs.

[0287] Field Description

[0288] Empty—Represents an event with no event data. Inherited fromEventArgs.

[0289] Method Description

[0290] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0291] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0292] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0293] GetType—Gets the Type of the current instance. Inherited fromObject.

[0294] InvokeEventHandler—Raises the data transfer event.

[0295] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0296] OnSetSource—Invoked when the source of the event is set.Inherited from RoutedEventArgs.

[0297] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0298] SetRoutedEventID—Sets the RoutedEventID to the specified valueInherited from RoutedEventArgs.

[0299] SetSource—Sets the Source Property to the specified valueInherited from RoutedEventArgs.

[0300] ToString—Returns a String that represents the current Object.Inherited from Object. class System.Windows.Data.DataTransferEventArgs :RoutedEventArgs : EventArgs : Object { public DependencyPropertyget_Property( ) protected virtual Void InvokeEventHandler(DelegategenericHandler, Object genericTarget) }

[0301] Represents the method that handles a data transfer event raisedby Binding.

[0302] Parameters

[0303] sender—System.Object. The source object (instance of Binding)that raised the event.

[0304] args—System.Windows.Data.DataTransferEventArgs. Arguments of theevent, as an instance of DataTransferEventArgs. Return ValueSystem.Void.

[0305] Arguments of the event will inform you which bound propertywithin the binding transferred data.

[0306] Binding does not expose this event as a member, but does exposethe static DataTransferEventID property that is used to identify theevent and attach a handler to that event.

[0307] How Do I Notify when Data is Transferred?

[0308] This example describes how to set up notification when data istransferred from the source to the target property.

[0309] According to one embodiment the operating system “Avalon” raisesa data transfer event each time that data transfers from the source of abinding to a target. Internally, this event is used to inform the userinterface (UI) that it should update, because the bound data haschanged. Note that in order for the data transfer event to work, andalso in order for one-way or two-way binding to work properly, you needto implement your data class using the IPropertyChange interface. Fordetails on creating data items or classes that implement this interface,see Create a One-Way Binding to a Dynamically Updated Data Source.

[0310] In order to make this event available to your application, setthe NotifyOnTransfer flag in the bind declaration. This can be done in aparticular markup language (named “XAML”), using either the *Bind syntaxor the BindFlags attribute of Bind, or in C#, by using parameters of thebind declarations. The handler you use to listen for this event musttypically be attached directly to the element where you want to beinformed of changes, or to the overall data context if you want to beaware that anything in the context has changed. <SimpleTextID=“RentText” Text=“*Bind(Path=Rent;BindType=OneWay;BindFlags=NotifyOnTransfer)” Canvas.Top=“50px” Canvas.Left=“140px” Width=“120px”Height=“20px” />

[0311] In the code, assign a handler based on theDataTransferEventHandler delegate, OnDataTransfer in this example, tohandle the data transfer event. Use Binding.DataTransferEventID to getthe necessary routing ID.

[0312] In this C# sample, clicking a button will cause new data to begenerated and the values in various text boxes will be updated. When theevent is raised and handled, a “Data Updated . . . ” message is printed.Parameters of the event can be used to determine details about theproperty that changed (such as the type or the specific element if thesame handler is attached to more than one element), which can be usefulif there are multiple bound properties on a single element.RentText.AddHandler(Binding.DataTransferEventID, newDataTransferEventHandler(OnDataTransfer)); ... public voidOnDataTransfer(Object sender, DataTransferEventArgs args) {FrameworkElement fe = sender as FrameworkElement; InfoText.Text = “”;InfoText.Text += args.Property.Name + “ property of a ” +args.Property.OwnerType.Name; InfoText.Text += “ element (”;InfoText.Text += fe.ID; InfoText.Text += “) updated...”; InfoText.Text+= (String) System.DateTime.Now.ToLongDateString( ); InfoText.Text += “at ”; InfoText.Text += (String) System.DateTime.Now.ToLongTimeStringO; }class sealed System.Windows.Data.DataTransferEventHandler :MulticastDelegate : Delegate : Object Implements: ICloneableISerializable { public virtual IAsyncResult BeginInvoke(Object sender,DataTransferEventArgs args, AsyncCallback callback, Object object)public virtual Void EndInvoke(IAsyncResult result) public virtual VoidInvoke(Object sender, DataTransferEventArgs args) }

[0313] Represents an object reference to an element, with the objectbeing specified by its element ID. This class cannot be inherited.

[0314] Method Description

[0315] ElementObjectRef—Initializes a new instance of theElementObjectRef class.

[0316] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0317] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0318] FindRootElement—Finds the root element for a given element.Inherited from ObjectRef.

[0319] GetDataObject—Within derived classes, returns the data contextobject associated with the referenced object. Inherited from ObjectRef.

[0320] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0321] GetObject—Returns the referenced object.

[0322] GetType—Gets the Type of the current instance. Inherited fromObject.

[0323] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0324] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0325] ToString—Returns a String that represents the current Object.Inherited from Object. class sealedSystem.Windows.Data.ElementObjectRef: ObjectRef : Object { publicvirtual Object GetObject(DependencyObject d) }

[0326] Represents an explicit object reference to an element. This classcannot be inherited.

[0327] Method Description

[0328] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0329] ExplicitObjectRef—Initializes a new instance of theExplicitObjectRef class.

[0330] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0331] FindRootElement—Finds the root element for a given element.Inherited from ObjectRef.

[0332] GetDataObject—Within derived classes, returns the data contextobject associated with the referenced object. Inherited from ObjectRef.

[0333] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0334] GetObject—Returns the referenced object for the givenDependencyObject context.

[0335] GetType—Gets the Type of the current instance. Inherited fromObject.

[0336] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0337] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0338] ToString—Returns a String that represents the current Object.Inherited from Object.

[0339] This class is used to provide explicit references (by identifier(ID)) to objects used as source objects for bindings.

[0340] This class is a subclass of ObjectRef.

[0341] How Do I Create a Binding?

[0342] This example shows how to create a binding in C#. To do this, youattach the binding object for the SampleText source property in data tothe Text property of the SimpleText element, mytext.

[0343] When calling the Bind constructor, you can pass the source objectthrough the ExplicitObjectRef constructor to get an ObjectRef object.There are many possible signatures both for the Bind constructor and forthe SetBinding convenience method, and it is even possible to create theentire binding with the convenience method without calling the Bindconstructor at all, but this example splits the operation into theconstructor piece and then the specific setting of that bind declarationon an individual property of an element. If you do this in two steps,then the bind declaration created as the intermediate can be reused forbinding to more than one element in your application. public voidCreateBinding( ) { myDataObject = new myData(System.DateTime.Now);myBindDef = new Bind(“MyDataProperty”, BindType.TwoWay, newExplicitObjectRef(myDataObject));mytext.SetBinding(SimpleText.TextProperty, myBindDef); ... } classsealed System.Windows.Data.ExplicitObjectRef : ObjectRef : Object {public virtual Object GetObject(DependencyObject d) } abstract interfaceSystem.Windows.Data.IContains { public virtual Boolean Contains(Objectitem) } abstract interface System.Windows.Data.IDataSource { publicvirtual Object get_Data( ) public virtual Void Refresh( ) } abstractinterface System.Windows.Data.IDataTransformer { public virtual ObjectInverseTransform(Object o, PropertyInfo info, CultureInfo culture)public virtual Object Transform(Object o, DependencyProperty dp,CultureInfo culture) }

[0344] Implements a collection view for collections based on IList.

[0345] Event Description

[0346] CollectionChanged—Occurs when the collection view changes. Thiscould mean that items were added or removed in the collection, or that anew sort or filter was applied to this view. Inherited fromCollectionView.

[0347] ProtectedCurrentChanged—A protected event. In derived classes,this event occurs after changing the position of the record pointer.Inherited from CollectionView.

[0348] ProtectedCurrentChanging—A protected event. In derived classes,this event occurs before a change in currency. If necessary, handlers ofthe event can cancel the change. Inherited from CollectionView.

[0349] Method Description

[0350] ChangedCurrent—Raises the implemented CurrentChanged event of theobject. Inherited from CollectionView.

[0351] CheckUiContextAccess—Determines whether the calling thread isactive within the context this collection view is bound to. Inheritedfrom ContextAffinityCollectionView.

[0352] Contains—Determines whether a given data item belongs to thiscollection view.

[0353] ContainsItem—Determines whether a given data item belongs to thiscollection view or to the unfiltered collection.

[0354] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0355] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0356] GetEnumerator—Returns an enumerator that can iterate through thecollection view.

[0357] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0358] GetType—Gets the Type of the current instance. Inherited fromObject.

[0359] IComparer.Compare—Implements the comparison algorithm used bysorting in this collection. This method is not intended to be calleddirectly.

[0360] ICurrentItem.MoveFirst—Moves the record pointer to the firstrecord in the collection view.

[0361] ICurrentItem.MoveLast—Moves the record pointer to the last recordin the collection view.

[0362] ICurrentItem.MoveNext—Moves the record pointer to the next recordin the collection view.

[0363] ICurrentItem.MovePrevious—Moves the record pointer to theprevious record in the collection view.

[0364] ICurrentItem.MoveTo—Moves the record pointer to the specifiedrecord in the collection view.

[0365] IndexOf—Returns the index where the given data item belongs inthe collection, or −1 if the index of that item is unknown.

[0366] ListCollectionView—Initializes a new instance of theListCollectionView class, using a supplied IList-derived collection.

[0367] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0368] OKToChangeCurrent—Determines whether it is allowable to changethe position of the current record pointer. Inherited fromCollectionView.

[0369] OnCollectionChanged—Implement this method to handleCollectionChanged events in the data collection that underlies thecollection view. Inherited from CollectionView.

[0370] PrepareLocalArray—Creates, filters and sorts the local indexarray. This method is also called when you call Refresh.

[0371] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0372] Refresh—Refreshes the view. Re-applies any current sort or filteroperations, as set by various properties that declare sort or filtercriteria.

[0373] ToString—Returns a String that represents the current Object.Inherited from Object.

[0374] VerifyUiContextAccess—Verifies that the calling thread is activewithin the context that this collection view is bound to. If not, anexception is raised. Inherited from ContextAffinityCollectionView.

[0375] Property Attribute Description

[0376] ActiveComparer—Gets the current active comparer used in sorting.

[0377] ActiveFilter—Gets the current active Contains information used infiltering.

[0378] CanFilter—Gets a value that declares whether this view can befiltered on the basis of its Filter property. Inherited fromCollectionView.

[0379] CanSort—Gets a value that declares whether the collection can besorted on the basis of its Sort property.

[0380] Collection—Gets the underlying data collection object. Inheritedfrom CollectionView.

[0381] Comparer—Gets the comparison object being used by the collectionview. Inherited from CollectionView.

[0382] Count—Gets the count of records in the collection.

[0383] CurrentIndex—Gets or sets the current index.

[0384] CurrentItem—Gets the current object in the data collection, byreturning an object that implements a Current property as well asseveral other methods for moving or checking currency. Inherited fromCollectionView.

[0385] CustomFilter—Gets or sets the custom filter criteria applied tothe collection by the view.

[0386] CustomSort—Gets or sets the custom sort order applied to thecollection by the view.

[0387] Filter—Gets or sets the filter applied to the data in a datacollection view. Inherited from CollectionView.

[0388] InternalList—Gets or sets the internal (complete, unfiltered)collection.

[0389] Sort—Gets or sets the sort descriptions that apply a sort orderto the collection.

[0390] UIContext—Gets the user interface (UI) context that thiscollection view is bound to. Inherited fromContextAffinityCollectionView.

[0391] UsesLocalArray—Gets a Boolean value that indicates whethersorting or filtering is taking place either on a local array copy or onthe original data.

[0392] ViewManagerData—Gets implementation data about a view. Inheritedfrom CollectionView. class System.Windows.Data.ListCollectionView :ContextAffinityCollectionView : CollectionView : Object Implements:IEnumerable ICollectionChange ICurrentItem IComparer { public virtualBoolean Contains(Object item) public virtual Boolean ContainsItem(Objectitem) protected IComparer get_ActiveComparer( ) protected IContainsget_ActiveFilter( ) public virtual Boolean get_CanSort( ) public virtualInt32 get_Count( ) protected Int32 get_CurrentIndex( ) public IContainsget_CustomFilter( ) public IComparer get_CustomSort( ) protected IListget_InternalList( ) public virtual SortDescription[ ] get_Sort( )protected Boolean get_UsesLocalArray( ) public virtual IEnumeratorGetEnumerator( ) public virtual Int32 IndexOf(Object item) virtualsealed VoidSystem.ComponentModel.ICurrentItem.add_CurrentChanged(CurrentChangedEventHandlervalue) virtual sealed VoidSystem.ComponentModel.ICurrentItem.add_CurrentChanging(CurrentChangingEventHandlervalue) virtual sealed BooleanSystem.ComponentModel.ICurrentItem.get_BOF( ) virtual sealed ObjectSystem.ComponentModel.ICurrentItem.get_Current( ) virtual sealed BooleanSystem.ComponentModel.ICurrentItem.get_EOF( ) virtual sealed BooleanSystem.ComponentModel.ICurrentItem.MoveFirst( ) virtual sealed BooleanSystem.ComponentModel.ICurrentItem.MoveLast( ) virtual sealed BooleanSystem.ComponentModel.ICurrentItem.MoveNext( ) virtual sealed BooleanSystem.ComponentModel.ICurrentItem.MovePrevious( ) virtual sealedBoolean System.ComponentModel.ICurrentItem.MoveTo(Object item) virtualsealed VoidSystem.ComponentModel.ICurrentItem.remove_CurrentChanged(CurrentChangedEventHandlervalue) virtual sealed VoidSystem.ComponentModel.ICurrentItem.remove_CurrentChanging(CurrentChangingEventHandlervalue) protected virtual IList PrepareLocalArray(IList list) publicvirtual Void Refresh( ) protected Void set_ActiveComparer(IComparervalue) protected Void set_ActiveFilter(IContains value) protected Voidset_CurrentIndex(Int32 value) public Void set_CustomFilter(IContainsvalue) public Void set_CustomSort(IComparer value) protected Voidset_InternalList(IList value) public virtual Voidset_Sort(SortDescription[ ] value) virtual sealed Int32System.Collections.IComparer.Compare(Object o1, Object o2) }

[0393] Serves as a data source for data binding. Bindable data items canbe specified as common language runtime types.

[0394] Event Attribute Description

[0395] DataChanged—Raised when a new data object becomes available.

[0396] RefreshCompleted—Raised when the refresh operation has completed.This event is raised only if the data source is using Asynchronous mode.

[0397] Method Description

[0398] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0399] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0400] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0401] GetType—Gets the Type of the current instance. Inherited fromObject.

[0402] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0403] ObjectDataSource—Initializes a new instance of theObjectDataSource class.

[0404] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0405] Refresh—Creates the mid-tier data object based on the currentvalue of the TypeName and Parameters properties. This method gets calledautomatically upon the first request for the data.

[0406] ToString—Returns a String that represents the current Object.Inherited from Object.

[0407] Property Attribute Description

[0408] Asynchronous—Gets or sets a property that declares whether dataobject creation will be performed in a worker thread or in the active(UI) context.

[0409] Data—Gets the underlying data object.

[0410] Parameters—Gets or sets a comma-delimited string that describesthe arguments to be passed to the constructor of the instantiatedobject.

[0411] TypeName—Gets or sets the name of the common language runtimetype to instantiate. This can be a fully-qualified type name, or a typedefined locally in the assembly of the page. classSystem.Windows.Data.ObjectDataSource : Object Implements: IDataSource {public Boolean get_Asynchronous( ) public virtual sealed Objectget_Data( ) public String get_Parameters( ) public String get_TypeName() public virtual sealed Void Refresh( ) public Voidset_Asynchronous(Boolean value) public Void set_Parameters(String value)public Void set_TypeName(String value) }

[0412] The abstract class that is used as the parent class ofElementObjectRef, ExplicitObjectRef, and TypeObjectRef.

[0413] Method Description

[0414] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0415] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0416] FindRootElement—Finds the root element for a given element.

[0417] GetDataObject—Within derived classes, returns the data contextobject associated with the referenced object.

[0418] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0419] GetObject—Within derived classes, returns the data context objectassociated with the referenced object.

[0420] GetType—Gets the Type of the current instance. Inherited fromObject.

[0421] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0422] ObjectRef—Initializes a new instance of the ObjectRef class. Thismethod is protected in the base class.

[0423] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0424] ToString—Returns a String that represents the current Object.Inherited from Object. abstract class System.Windows.Data.ObjectRef :Object { protected static DependencyObjectFindRootElement(DependencyObject d) public virtual ObjectGetDataObject(DependencyObject d) public virtual ObjectGetObject(DependencyObject d) }

[0425] Objects of this class hold the collection of named parameters(with their corresponding values) for an SqlDataSource.

[0426] Method Description

[0427] Add—Adds a named parameter to the parameter collection given thenew parameter's name and value.

[0428] CopyTo—Copies all of the parameters in the parameter collectionto a specified array, starting at a specified index in the array.

[0429] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0430] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0431] GetEnumerator—Gets an IEnumerator interface that can be used toenumerate over the parameters in the collection.

[0432] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0433] GetType—Gets the Type of the current instance. Inherited fromObject.

[0434] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0435] ParameterCollection—Initiates a new instance of theParameterCollection class.

[0436] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0437] ToString—Returns a String that represents the current Object.Inherited from Object.

[0438] Property Description

[0439] Count—Gets the count of parameters in this parameter collection.

[0440] IsSynchronized—Gets a value that indicates whether access to thiscollection is synchronized (i.e., thread-safe).

[0441] Item—An indexer that gets or sets the object value of a namedparameter in the collection.

[0442] SyncRoot—Gets an object that can be used to synchronize access tothis parameter collection. class System.Windows.Data.ParameterCollection: Object Implements: ICollection IEnumerable { public Void Add(StringparamName, Object initialValue) public virtual sealed Void CopyTo(Arrayarray, Int32 index) public virtual sealed Int32 get_Count( ) publicvirtual sealed Boolean get_IsSynchronized( ) public Objectget_Item(String paramName) public virtual sealed Object get_SyncRoot( )public virtual sealed IEnumerator GetEnumerator( ) public Voidset_Item(String paramName, Object value) }

[0443] This class represents a single select statement to be submittedto the database.

[0444] Method Description

[0445] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0446] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0447] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0448] GetType—Gets the Type of the current instance. Inherited fromObject.

[0449] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0450] QueryCommand—Default constructor does nothing

[0451] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0452] ToString—Returns a String that represents the current Object.Inherited from Object.

[0453] Property Attribute Description

[0454] Table—Gets or sets the name of the table that will store queryresults.

[0455] Text—Gets or sets the Structured Query Language (SQL) querystring of this query object. class System.Windows.Data.QueryCommand :Object { public String get_Table( ) public String get_Text( ) publicVoid set_Table(String value) public Void set_Text(String value) }

[0456] Encapsulates the arguments passed either in the RefreshCompletedevent of ObjectDataSource, or in the RefreshCompleted event ofXmlDataSource.

[0457] Field Description

[0458] Empty—Represents an event with no event data. Inherited fromEventArgs.

[0459] Method Description

[0460] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0461] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0462] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0463] GetType—Gets the Type of the current instance. Inherited fromObject.

[0464] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0465] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0466] RefreshCompletedEventArgs—Initializes a new instance of theRefreshCompletedEventArgs class.

[0467] ToString—Returns a String that represents the current Object.Inherited from Object.

[0468] Property Description

[0469] Exception—Gets the exception raised if the refresh operationresulted in an error. class System.Windows.Data.RefreshCompletedEventArgs : EventArgs : Object { publicException get_Exception( ) }

[0470] Represents the method that handles theObjectDataSource.RefreshCompleted and XmlDataSource.RefreshCompletedevents. Parameters sender System.Object. The object (data source) thatraised the event. e System.Windows.Data.RefreshCompletedEventArgs.Arguments of the event, as an instance of RefreshCompletedEventArgs.Return Value System.Void. class sealedSystem.Windows.Data.RefreshCompletedEventHandler :MulticastDelegate :Delegate : Object Implements: ICloneable ISerializable { public virtualIAsyncResult BeginInvoke(Object sender, RefreshCompletedEventArgs e,AsyncCallback callback, Object object) public virtual VoidEndInvoke(IAsyncResult result) public virtual Void Invoke(Object sender,RefreshCompletedEventArgs e) }

[0471] A list of sql commands and the names of the tables that theyshould be used to fill.

[0472] Method Description

[0473] Add—Adds a new SqlCommand object to the list.

[0474] AddChild—This method is called to add a child to this object.

[0475] AddText—This method is called when plain text appears under thetag in markup. In this case it is ignored.

[0476] Clear—Removes all entries in the list.

[0477] Contains—Determines if the specified QueryCommand is in thearray. Both the Text and Table values must typically be equal to countas a match.

[0478] CopyTo—Copies the entire SqlCommandList to the specified onedimentional array starting at the specified index of the target array.

[0479] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0480] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0481] GetEnumerator—Returns an enumerator which enumerates allQueryCommands in this set

[0482] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0483] GetType—Gets the Type of the current instance. Inherited fromObject.

[0484] IList.Add

[0485] IList.Contains

[0486] IList.IndexOf

[0487] IList.Insert

[0488] IList.Remove

[0489] IndexOf—Returns the zero-based index of the first occurance ofthe specified value.

[0490] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0491] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0492] Remove—Removes the first occurance of the specified QueryCommandfrom the list.

[0493] RemoveAt—Removes the QueryCommand at the given position.

[0494] SqlCommandList

[0495] ToString—Returns a String that represents the current Object.Inherited from Object.

[0496] Property Description

[0497] Count—Returns the number of elements contained in the list.

[0498] Item—Returns the QueryCommand at the given index. classSystem.Windows.Data.SqlCommandList : Object Implements: IListICollection IEnumerable IAddChild { public Void Add(QueryCommandcommand) public virtual sealed Void AddChild(Object o) public virtualsealed Void AddText(String s) public virtual sealed Void Clear( ) publicBoolean Contains(QueryCommand value) public virtual sealed VoidCopyTo(Array array, Int32 index) public virtual sealed Int32 get_Count() public QueryCommand get_Item(Int32 index) public virtual sealedIEnumerator GetEnumerator( ) public Int32 IndexOf(QueryCommand value)public Void Remove(QueryCommand value) public virtual sealed VoidRemoveAt(Int32 index) public Void set_Item(Int32 index, QueryCommandvalue) virtual sealed BooleanSystem.Collections.ICollection.get_IsSynchronized( ) virtual sealedObject System.Collections.ICollection.get_SyncRoot( ) virtual sealedInt32 System.Collections.IList.Add(Object command) virtual sealedBoolean System.Collections.IList.Contains(Object value) virtual sealedBoolean System.Collections.IList.get_IsFixedSize( ) virtual sealedBoolean System.Collections.IList.get_IsReadOnly( ) virtual sealed ObjectSystem.Collections.IList.get_Item(Int32 index) virtual sealed Int32System.Collections.IList.IndexOf(Object value) virtual sealed VoidSystem.Collections.IList.Insert(Int32 index, Object command) virtualsealed Void System.Collections.IList.Remove(Object value) virtual sealedVoid System.Collections.IList.set_Item(Int32 index, Object value) }

[0499] According to one embodiment, SqlDataSource gets data from aMicrosoft SQL Server for use in databinding.

[0500] Event Attribute Description

[0501] DataChanged—This event is raised when a new data object becomesavailable.

[0502] WriteComplete—This event is fired when data has been written backto the database.

[0503] Method Description

[0504] BeginParamChange—Temporarily defers any updates to the dataset(unless requested explicitly with Refresh( )) until the EndParamChangemethod is called

[0505] EndParamChange—Signals that parameters have been updated and thatthe dataset should be refreshed from the Sql server. This will notrefresh the dataset if none of the parameters have been changed. Toupdate the dataset unconditionally use the Refresh method.

[0506] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0507] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0508] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0509] GetType—Gets the Type of the current instance. Inherited fromObject.

[0510] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0511] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0512] Refresh—Initiates a Refresh Operation on the DataSource that willultimately result in the Data property to change, if the Data propertychanges the DataChanged event should fire. This method is calledautomatically at the first request for the data

[0513] SqlDataSource—The default constructor creates a new SqlDataSourcewith a blank connection string and a blank query

[0514] ToString—Returns a String that represents the current Object.Inherited from Object.

[0515] WriteChanges—Commits the changes made to the data back to thedatabase asynchronously.

[0516] Property Attribute Description

[0517] ConnectionString—This is the Sql server connection string, itindicates things like where to find the sql server and what uid andpassword to use.

[0518] Data—Returns the underlying data object.

[0519] DataSet—This gives the developer access to the underlying DataSetso the functionality of ADO can be used if necessary

[0520] DataSourceMode—The DataSourceMode determines what sort of objectwill be returned as the Data property.

[0521] DeferredParamChange—This flag indicates whether to refresh thedata set immediately when a parameter's value changes or wait untilEndParamChange( ) mehtod is called.

[0522] ReadResult—If an error happened when querying the database it canbe viewed here

[0523] Select—The collection of QueryCommand objects which are used toquery the database.

[0524] SelectParameters—Exposes the ParameterCollection object whichcontains the names and values of all of the named parameters.

[0525] WriteResult—If an error happened when writing changes back to thedatabase it can be viewed here class System.Windows.Data.SqlDataSource :Object Implements: IDataSource { public Void BeginParamChange( ) publicVoid EndParamChange( ) public String get_ConnectionString( ) publicvirtual sealed Object get_Data( ) public DataSet get_DataSet( ) publicSqlDataSourceMode get_DataSourceMode( ) public Booleanget_DeferredParamChange( ) public Exception get_ReadResult( ) publicSqlCommandList get_Select( ) public ParameterCollectionget_SelectParameters( ) public Exception get_WriteResult( ) publicvirtual sealed Void Refresh( ) public Void set_ConnectionString(Stringvalue) public Void set_DataSourceMode(SqlDataSourceMode value) publicVoid WriteChanges( ) } enum sealedSystem.Windows.Data.SqlDataSource+SqlDataSourceMode : Enum : ValueType :Object Implements: IComparable IFormattable IConvertible { public staticSqlDataSourceMode DataReader public static SqlDataSourceMode DataSetpublic static SqlDataSourceMode XmlReader }

[0526] Allows resource reference to a transformer class that is definedas code-behind in the current application.

[0527] Method Description

[0528] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0529] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0530] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0531] GetType—Gets the Type of the current instance. Inherited fromObject.

[0532] IDataTransformer.InverseTransform—Aliases your customtransformer's InverseTransform method implementation. This method is notintended to be called directly.

[0533] IDataTransformer.Transform—Aliases your custom transformer'sTransform method implementation. This method is not intended to becalled directly.

[0534] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0535] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0536] ToString—Returns a String that represents the current Object.Inherited from Object.

[0537] TransformerSource—Initializes a new instance of theTransformerSource class.

[0538] Property Description

[0539] TypeName—Gets or sets the assembly and class information for thetransformer class that this TransformerSource instance is aliasing for.

[0540] How Do I Transform Bound Data?

[0541] This example shows how to transform data that is used inbindings.

[0542] To transform data, you create a class that implements theIDataTransformer interface, which includes the Transform andInverseTransform methods.

[0543] In this C# example, the transformer works against two possibleproperties of a binding: the text within a text block and the foregroundcolor. The same transformer can return either result as the appropriatetype, based on switching on the dp input parameter. This is a usefulfeature in a transformer because the transformer is attached to a binddeclaration, and the same bind declaration can be used to createmultiple bindings on a single data source for properties of differentdestination types. public class MyTransformer : IDataTransformer {public object Transform(object o, DependencyProperty dp,System.Globalization.CultureInfo culture) { DateTime date = (DateTime)o;switch (dp.Name) { case “Text”: return “Heute ist” + date.ToString(“F”,new System.Globalization.CultureInfo(“de-DE”)); case “Foreground”:return Colors.Red; default: return o; } } public objectInverseTransform(object o, System.Reflection.PropertyInfo info,System.Globalization.CultureInfo culture) { return null; } }

[0544] Using “XAML”, a transformer class is an application resource. Ifthe transformer code is written as code-behind inside the sameapplication, the resource is created as a TransformerSource element.This TransformerSource element allows you to avoid a circular referenceproblem with trying to reference a custom element inside resourcesbefore the transformer class itself is compiled further down in thecode. Then, to specify the transformer within a binding, set thetransformer attribute to the resource name of your TransformerSourceelement in resources. This example uses compound syntax to set thebinding, but the transformer can also be set in *Bind syntax. <Canvasxmlns=“http://schemas.microsoft.com/2003/xaml” xmlns:def=“Definition”def:Language=“C#” def:Class=“WCPSample.MarkupTransformer”def:CodeBehind=“default.xaml.cs” ID=“root” > <Canvas.Resources><ObjectDataSource def:Name=“myDataSource”TypeName=“WCPSample.myData,MarkupTransformerSample” /><TransformerSource def:Name=“MyTransformerReference”TypeName=“MyTransformer”/> </Canvas.Resources> <Canvas.DataContext><Bind DataSource=“{myDataSource}” BindType=“OneWay” /></Canvas.DataContext> <SimpleText Canvas.Top=“10px” Canvas.Left=“5px”FontWeight=“Bold” FontSize=“18” Text=“Untransformed data”/> <SimpleTextCanvas.Top=“30px” Canvas.Left=“35px” Width=“300px” ID=“mytext”Text=“*Bind(Path=TheDate)”/> <SimpleText Canvas.Top=“50px”Canvas.Left=“5px” FontWeight=“Bold” FontSize=“18” Text=“Transformeddata”/> <SimpleText Canvas.Top=“70px” Canvas.Left=“35px” Width=“300px”Height=“30px” ID=“mytransformedtext”> <SimpleText.Text> <BindPath=“TheDate” Transformer=“{MyTransformerReference}”/></SimpleText.Text> <SimpleText.Foreground> <Bind Path=“TheDate”Transformer=“{MyTransformerReference}”/> </SimpleText.Foreground></SimpleText> </Canvas>

[0545] Using C#, you can specify the transformer when you create a newbind declaration object. Get an instance of your transformer by callingits constructor, and pass that instance as an argument to either aproperty of an existing bind declaration or in the bind declarationconstructor. In the following example, myChangedData is a custom dataitem, which contains the TheDate property. Bind myNewBindDef=new Bind(“TheDate”, BindType.OneWay, new ExplicitObjectRef(myChangedData),UpdateType.Immediate, new MyTransformer( ),newSystem.Globalization.CultureInfo(“en-US”) );

[0546] class System.Windows.Data.TransformerSource : Object Implements:IDataTransformer { public String get_TypeName( ) virtual sealed ObjectSystem.Windows.Data.IDataTransformer.InverseTransform(Object o,PropertyInfo info, CultureInfo culture) virtual sealed ObjectSystem.Windows.Data.IDataTransformer.Transform(Object o,DependencyProperty dp, CultureInfo culture) public Voidset_TypeName(String value) }

[0547] Supports object reference by type. This class cannot beinherited.

[0548] Method Description

[0549] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0550] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0551] FindRootElement—Finds the root element for a given element.Inherited from ObjectRef.

[0552] GetDataObject—Within derived classes, returns the data contextobject associated with the referenced object. Inherited from ObjectRef.

[0553] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0554] GetObject—Returns the object reference for a given data context.

[0555] GetType—Gets the Type of the current instance. Inherited fromObject.

[0556] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0557] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0558] ToString—Returns a String that represents the current Object.Inherited from Object.

[0559] TypeObjectRef—Initializes a new instance of the TypeObjectRefclass. class sealed System.Windows.Data.TypeObjectRef : ObjectRef :Object { public virtual Object GetObject(DependencyObject d) } enumsealed System.Windows.Data.UpdateType : Enum : ValueType : ObjectImplements: IComparable IFormattable IConvertible { public staticUpdateType Explicit public static UpdateType Immediate public staticUpdateType OnLostFocus }

[0560] The WinFSDataSource facilitates databinding of data stored inWinFS with Avalon applications

[0561] Event Description

[0562] DataChanged—This event gets fired when new data is available orwhen that data changes

[0563] DataUpdated—This event gets fired following a call toWriteChanges( )

[0564] Method Description

[0565] Dispose—If the client choses to dispose this object it will closethe FindResult if it is still open. Otherwise it will be done in thefinalizer.

[0566] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0567] Finalize—The Finalizer will close the FindResult if it has notbeen closed earlier

[0568] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0569] GetType—Gets the Type of the current instance. Inherited fromObject.

[0570] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0571] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0572] Refresh—This method causes the query to be executed and new datato be returned. When the new data is ready the DataChanged event isfired.

[0573] ToString—Returns a String that represents the current Object.Inherited from Object.

[0574] Update—Writes any changes to the data back to the winfs storeWinFSDataSource—Default constructor

[0575] Property Description

[0576] ContextString—Use this property to specify a WinFS store otherthan the default store.

[0577] Data—Returns the underlying data object

[0578] Query—The Query object must typically have it's classSystem.Windows.Data.WinFSDataSource : Object Implements: IDataSourceIDisposable { public virtual sealed Void Dispose( ) protected virtualVoid Finalize( ) public String get_ContextString( ) public virtualsealed Object get_Data( ) public Query get_Query( ) public virtualsealed Void Refresh( ) public Void set_ContextString(String value)public Void set_Query(Query value) public Void Update( ) }

[0579] XmlDataNamespaceManager Class—Used to declare namespaces to beused in Xml data binding XPath queries

[0580] Method Description

[0581] AddNamespace—Adds the given namespace to the collection.Inherited from XmlNamespaceManager.

[0582] AddText—IAddChild implementation

[0583] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0584] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0585] GetEnumerator—Provides support for the “foreach” style iterationover the collection of namespaces in the XmlNamespaceManager . Inheritedfrom XmlNamespaceManager.

[0586] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0587] GetNamespacesInScope—Gets a collection of namespace names keyedby prefix which can be used to enumerate the namespaces currently inscope. Inherited from XmlNamespaceManager.

[0588] GetType—Gets the Type of the current instance. Inherited fromObject.

[0589] HasNamespace—Gets a value indicating whether the supplied prefixhas a namespace defined for the current pushed scope. Inherited fromXmlNamespaceManager.

[0590] IAddChild.AddChild

[0591] LookupNamespace—Gets the namespace URI for the specified prefix.Inherited from XmlNamespaceManager.

[0592] LookupPrefix—Finds the prefix declared for the given namespaceURI. Inherited from XmlNamespaceManager.

[0593] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0594] PopScope—Pops a namespace scope off the stack. Inherited fromXmlNamespaceManager.

[0595] PushScope—Pushes a namespace scope onto the stack. Inherited fromXmlNamespaceManager.

[0596] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0597] RemoveNamespace—Removes the given namespace for the given prefix.Inherited from XmlNamespaceManager.

[0598] ToString—Returns a String that represents the current Object.Inherited from Object.

[0599] XmlDataNamespaceManager—Constructor

[0600] Property Description

[0601] DefaultNamespace—Gets the namespace URI for the defaultnamespace. Inherited from XmlNamespaceManager.

[0602] NameTable—Gets the XmlNameTable associated with this object.Inherited from XmlNamespaceManager. classSystem.Windows.Data.XmlDataNamespaceManager : XmlNamespaceManager :Object Implements: IXmlNamespaceResolver IEnumerable IAddChild { publicvirtual sealed Void AddText(String s) virtual sealed VoidSystem.Windows.Serialization.IAddChild.AddChild(Object o) }

[0603] Serves as a data source for data binding to Extensible MarkupLanguage (XML) content nodes.

[0604] Event Attribute Description

[0605] DataChanged—Raise this event when a new data object becomesavailable.

[0606] RefreshCompleted—Notifies when the refresh operation hascompleted. This event is typically only raised if the data source isasynchronous, and that typically will only be the case when the XMLsource is an external file rather than inline XML.

[0607] Method Description

[0608] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0609] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0610] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0611] GetType—Gets the Type of the current instance. Inherited fromObject.

[0612] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0613] Parse—Parses the object's XML content, using the specified readerand context.

[0614] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0615] Refresh—Resets the data collection maintained by this object,based on the result from the XPath query.

[0616] ToString—Returns a String that represents the current Object.Inherited from Object.

[0617] XmlDataSource—Initializes a new instance of the XmlDataSourceclass.

[0618] Property Attribute Description

[0619] Data—Gets the underlying data object. If the source of the datais an external file, the first access to this property will return null(because the data is handled asynchronously).

[0620] Document—Gets or sets the underlying data as an XML document.This is the property representation of any inline XML data establishedfor this object.

[0621] Source—Gets or sets the Uniform Resource Identifier (URI) sourceof the external XML data used by this object.

[0622] XmlNamespaceManager—Gets or sets the mamespace manager used forexecuting XPath queries.

[0623] XPath—Gets or sets the XPath query used to produce an appropriatenode list to use for data binding this object.

[0624] How Do I Bind to XML Data?

[0625] This example describes how to bind to data in an XML data source.You can bind to a data source that is an XML node or a collection of XMLnodes.

[0626] In this particular markup language (named “XAML”) example, a datasource is coded in an application's main “XAML” page as one of theresources of an outermost DockPanel. The actual XML data is suppliedwithin the resource. This arrangement is sometimes called an XML dataisland.

[0627] The following example shows a very short XML data island that hasa Books tree containing Book elements. The XmlDataSource resource isused to define the XML data source that contains the Books data.<DockPanel xmlns=“http://schemas.microsoft.com/2003/xaml/”xmlns:def=“Definition”> <DockPanel.Resources> <XmlDataSourcedef:Name=“BookData” XPath=“/Books”> <Books xmlns=“”> <BookISBN=“0-7356-0562-9” Stock=“in”> <Title>XML in Action</Title><Summary>XML Web Technology</Summary> </Book> <Book ISBN=“0-7356-1370-2”Stock=“in”> <Title>Programming Microsoft Windows With C#</Title><Summary>C# Programming Using the .NET Framework</Summary> </Book> <!--... other Book entries ... --> </Books> </XmlDataSource> <Styledef:Name=“BookDataStyle”> <ContentPresenter/> <Style.VisualTree><SimpleText FontSize=“Small” Foreground=“Black”> <SimpleText.Text> <BindPath=“Title”/> </SimpleText.Text> </SimpleText> </Style.VisualTree></Style> </DockPanel.Resources> <!-- Bind a ListBox to thequery-selected books --> <ListBox ItemStyle=“ {BookDataStyle}”><ListBox.Items> <CollectionContainer> <CollectionContainer.Collection><Bind DataSource=“{BookData}” Path=“Book”/></CollectionContainer.Collection> </CollectionContainer></ListBox.Items> </ListBox> </DockPanel>

[0628] An initial XPath query on the collection is coded by assigningthe XPath attribute. This query string value will cause the data sourceto appear as a collection of data items. By varying the XPath query onthe data source, the initial XML data collection that is exposed can becontrolled. The XmlDataSource is also given an identifier (ID) byassigning BookData to the def:Name attribute.

[0629] A ListBox element can be used to bind to the XML data collection.The “XAML” markup above shows code for a ListBox that displays thetitles of the books in the collection. A data style is defined thatbinds to the Title element of each Book element in the data. This styleis defined in the main DockPanel's resources so it can be shared withinthe scope of that DockPanel. The Style is given the name BookDataStyle.This style can then be repeatedly applied by a ListBox control whosecollection is bound to the BookData data source. The ListBox's ItemStyleattribute is how the item style is specified to the ListBox. classSystem.Windows.Data.XmlDataSource : Object Implements: IDataSourceIParseLiteralContent { public virtual sealed Object get_Data( ) publicXmlDocument get_Document( ) public String get_Source( ) publicXmlNamespaceManager get_XmlNamespaceManager( ) public String get_XPath() public virtual Void Parse(TextReader textReader, ParserContextparserContext) public virtual sealed Void Refresh( ) public Voidset_Document(XmlDocument value) public Void set_Source(String value)public Void set_XmlNamespaceManager(XmlNamespaceManager value) publicVoid set_XPath(String value) }

[0630] Declares an individual namespace within an Extensible MarkupLanguage (XML) data source.

[0631] Method Description

[0632] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0633] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0634] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0635] GetType—Gets the Type of the current instance. Inherited fromObject.

[0636] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0637] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0638] ToString—Returns a String that represents the current Object.Inherited from Object.

[0639] XmlNameSpace—Initializes a new instance of the XmlNameSpaceclass.

[0640] Property Description

[0641] Prefix—Gets or sets the prefix to use for this namespace.

[0642] Uri—Gets or sets the Uniform Resource Identifier (URI) for thisnamespace. class System.Windows.Data.XmlNamespace : Object { publicString get_Prefix( ) public String get_Uri( ) public Voidset_Prefix(String value) public Void set_Uri(String value) }

[0643] The delegate to use for handlers that receive theDataContextChanged event. class sealedSystem.Windows.DataContextChangedEventHandler : MulticastDelegate :Delegate : Object Implements: ICloneable ISerializable { public virtualIAsyncResult BeginInvoke(Object sender, EventArgs args, AsyncCallbackcallback, Object object) public virtual Void EndInvoke(IAsyncResultresult) public virtual Void Invoke(Object sender, EventArgs args) }

[0644] Method Description

[0645] AddHandler—Add an instance handler for the given RoutedEventIDInherited from ContentElement.

[0646] AddToEventRoute—Adds handlers for the current instance to theroute Inherited from ContentElement.

[0647] BuildRoute—Builds the event route Inherited from ContentElement.

[0648] CaptureMouse—Captures the mouse to this element. Inherited fromContentElement.

[0649] ClearAllBindings—Removes all bindings attached to an element.

[0650] ClearBinding—Removes the binding attached to the specifiedDependencyProperty.

[0651] ClearValue—Clears the local value of a property Inherited fromDependencyObject.

[0652] DeferLoad—This purpose of this method as the name indicates is todefer the firing of the Loaded event

[0653] EndDeferLoad—This call is meant to match a prior DeferLoad call,thereby cause Loaded event to be fired if there are no more pendingEndDeferLoad calls.

[0654] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0655] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0656] FindResource—Searches for a resource with the passed name andreturns it Focus—Focuses the keyboard on this element. Inherited fromContentElement.

[0657] FrameworkContentElement—Create an instance of aFrameworkContentElement

[0658] GetAnimationBaseValue—If the dependency property is animated thismethod will give you the value as if it was not animated. Inherited fromContentElement.

[0659] GetAnimations—Retrieves an animation collection associated with aDependencyID on this element. Inherited from ContentElement.

[0660] GetBinding—Returns the Binding for the specified property.

[0661] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0662] GetLocalValueEnumerator—Create a local value enumerator for thisinstance Inherited from DependencyObject.

[0663] GetRoutedEventIDs—Get RoutedEventIDs with handlers Inherited fromContentElement.

[0664] GetType—Gets the Type of the current instance. Inherited fromObject.

[0665] GetValue—Retrieve the value of a property Inherited fromDependencyObject.

[0666] ILogicalTreeNode.OnNewParent

[0667] ILogicalTreeNode.OnParentChanged

[0668] InvalidateProperty—Invalidates a property Inherited fromDependencyObject.

[0669] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0670] OnDelayedInvalidate—Inherited from DependencyObject during build.

[0671] OnGotFocus—An event announcing that the keyboard is focused onthis element. Inherited from ContentElement.

[0672] OnGotMouseCapture—An event reporting that this element got themouse capture. Inherited from ContentElement.

[0673] OnIsFocusedChanged—An event reporting that the IsFocused propertyhas changed.

[0674] OnIsFocusWithinChanged—An event reporting that the IsFocusWithinproperty changed.

[0675] OnIsMouseCapturedChanged—An event reporting that theIsMouseCaptured property changed. Inherited from ContentElement.

[0676] OnIsMouseDirectlyOverChanged—An event reporting that theIsMouseDirectlyOver property has changed.

[0677] OnIsMouseOverChanged—An event reporting that the IsMouseOverproperty changed.

[0678] OnKeyDown—An event reporting a key was pressed. Inherited fromContentElement.

[0679] OnKeyUp—An event reporting a key was released. Inherited fromContentElement.

[0680] OnLostFocus—An event announcing that the keyboard is no longerfocused Inherited from ContentElement.

[0681] OnLostMouseCapture—An event reporting that this element lost themouse capture. Inherited from ContentElement.

[0682] OnMouseEnter—An event reporting the mouse entered this element.Inherited from ContentElement.

[0683] OnMouseLeave—An event reporting the mouse left this element.Inherited from ContentElement.

[0684] OnMouseLeftButtonDown—An event reporting the left mouse buttonwas pressed. Inherited from ContentElement.

[0685] OnMouseLeftButtonUp—An event reporting the left mouse button wasreleased. Inherited from ContentElement.

[0686] OnMouseMove—An event reporting a mouse move. Inherited fromContentElement.

[0687] OnMouseRightButtonDown—An event reporting the right mouse buttonwas pressed. Inherited from ContentElement.

[0688] OnMouseRightButtonUp—An event reporting the right mouse buttonwas released. Inherited from ContentElement.

[0689] OnMouseWheel—An event reporting a mouse wheel rotation. Inheritedfrom ContentElement.

[0690] OnNewParent—Sets input parent to given new value Inherited fromContentElement.

[0691] OnPreviewGotFocus—An event announcing that the keyboard isfocused on this element. Inherited from ContentElement.

[0692] OnPreviewKeyDown—An event reporting a key was pressed. Inheritedfrom ContentElement.

[0693] OnPreviewKeyUp—An event reporting a key was released. Inheritedfrom ContentElement.

[0694] OnPreviewLostFocus—An event announcing that the keyboard is nolonger focused Inherited from ContentElement.

[0695] OnPreviewMouseEnter—When the mouse enters an element, set thecursor. We do this in a class handler, rather than overridingOnIsMouseDirectlyOverChanged, because that is a virtual which can beoverridden and not called.

[0696] OnPreviewMouseLeave—An event reporting the mouse left thiselement. Inherited from ContentElement.

[0697] OnPreviewMouseLeftButtonDown—An event reporting the left mousebutton was pressed. Inherited from ContentElement.

[0698] OnPreviewMouseLeftButtonUp—An event reporting the left mousebutton was released. Inherited from ContentElement.

[0699] OnPreviewMouseMove—An event reporting a mouse move. Inheritedfrom ContentElement.

[0700] OnPreviewMouseRightButtonDown—An event reporting the right mousebutton was pressed. Inherited from ContentElement.

[0701] OnPreviewMouseRightButtonUp—An event reporting the right mousebutton was released. Inherited from ContentElement.

[0702] OnPreviewMouseWheel—An event reporting a mouse wheel rotation.Inherited from ContentElement.

[0703] OnPreviewTextlnput—An event announcing some text input. Inheritedfrom ContentElement.

[0704] OnPropertyInvalidated—Notification that a specified property hasbeen invalidated

[0705] OnStyleChanged

[0706] OnTextInput—An event announcing some text input. Inherited fromContentElement.

[0707] RaiseEvent—Raise routed event with the given args Inherited fromContentElement.

[0708] ReadLocalValue—Retrieve the local value of a property (if set)Inherited from DependencyObject.

[0709] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0710] ReleaseMouseCapture—Releases the mouse capture. Inherited fromContentElement.

[0711] RemoveHandler—Remove all instances of the given handler for thegiven RoutedEventID Inherited from ContentElement.

[0712] SetAnimations—Associates an AnimationCollection with aDependencyID on this element. Inherited from ContentElement.

[0713] SetBinding—Attaches a binding.

[0714] SetContext—Associates this UIContextObject with a UIContext.Inherited from UIContextObject.

[0715] SetResourceReference—Searches for a resource called name and setsup a resource reference to it for the passed property.

[0716] SetValue—Sets the local value of a property Inherited fromDependencyObject.

[0717] ToString—Returns a String that represents the current Object.Inherited from Object.

[0718] ValidateProperty—Retrieve the value of a property (for use bynative cache backed custom get accessors) Inherited fromDependencyObject.

[0719] ValidatePropertyCore—Allows subclasses to participate in propertyvalue computation class System.Windows.FrameworkContentElement :ContentElement : DependencyObject : UIContextObject : Object Implements:IInputElement IFrameworkInputElement ILogicalTreeNode ILoaded { publicVoid ClearAllBindings( ) public Void ClearBinding(DependencyProperty dp)public Object get_DataContext( ) public BindingGetBinding(DependencyProperty dp) public Void set_DataContext(Objectvalue) public Binding SetBinding(DependencyProperty dp, Bind bind)public Binding SetBinding(DependencyProperty dp, String path) publicBinding SetBinding(DependencyProperty dp, String path, BindTypebindType) public Binding SetBinding(DependencyProperty dp, String path,BindType bindType, ObjectRef source) public BindingSetBinding(DependencyProperty dp, String path, BindType bindType,ObjectRef source, UpdateType updateType) public BindingSetBinding(DependencyProperty dp, String path, BindType bindType,ObjectRef source, UpdateType updateType, IDataTransformer transformer)public Binding SetBinding(DependencyProperty dp, String path, BindTypebindType, ObjectRef source, UpdateType updateType, IDataTransformertransformer, CultureInfo culture) public BindingSetBinding(DependencyProperty dp, String path, BindType bindType,ObjectRef source, UpdateType updateType, IDataTransformer transformer,CultureInfo culture, BindFlags bindFlags) public staticreadonlyDependencyProperty DataContextProperty }

[0720] The base object for the Frameworks

[0721] Event Attribute Description

[0722] DataContextChanged—DataContextChanged event

[0723] GotFocus—An event announcing that the keyboard is focused on thiselement. Inherited from UIElement.

[0724] GotMouseCapture—An event reporting that this element got themouse capture. Inherited from UIElement.

[0725] IsFocusedChanged—An event reporting that the IsFocused propertychanged. Inherited from UIElement.

[0726] IsFocusWithinChanged—An event reporting that the IsFocusWithinproperty changed.

[0727] IsMouseCapturedChanged—An event reporting that theIsMouseCaptured property changed. Inherited from UIElement.

[0728] IsMouseDirectlyOverChanged—An event reporting that theIsMouseDirectlyOver property changed. Inherited from UIElement.

[0729] IsMouseOverChanged—An event reporting that the IsMouseOverproperty changed.

[0730] KeyDown—An event reporting a key was pressed. Inherited fromUIElement.

[0731] KeyUp—An event reporting a key was released. Inherited fromUIElement.

[0732] Loaded—This clr event is fired when IsLoaded becomes trueLostFocus—An event announcing that the keyboard is no longer focused onthis element. Inherited from UIElement.

[0733] LostMouseCapture—An event reporting that this element lost themouse capture. Inherited from UIElement.

[0734] MouseEnter—An event reporting the mouse entered this element.Inherited from UIElement.

[0735] MouseHover—An event reporting a mouse hover.

[0736] MouseLeave—An event reporting the mouse left this element.Inherited from UIElement.

[0737] MouseLeftButtonDown—An event reporting the left mouse button waspressed. Inherited from UIElement.

[0738] MouseLeftButtonUp—An event reporting the left mouse button wasreleased. Inherited from UIElement.

[0739] MouseMove—An event reporting a mouse move. Inherited fromUIElement.

[0740] MouseRightButtonDown—An event reporting the right mouse buttonwas pressed. Inherited from UIElement.

[0741] MouseRightButtonUp—An event reporting the right mouse button wasreleased. Inherited from UIElement.

[0742] MouseWheel—An event reporting a mouse wheel rotation. Inheritedfrom UIElement.

[0743] PreviewGotFocus—An event announcing that the keyboard is focusedon this element. Inherited from UIElement.

[0744] PreviewKeyDown—An event reporting a key was pressed. Inheritedfrom UIElement.

[0745] PreviewKeyUp—An event reporting a key was released. Inheritedfrom UIElement.

[0746] PreviewLostFocus—An event announcing that the keyboard is nolonger focused on this element. Inherited from UIElement.

[0747] PreviewMouseEnter—An event reporting the mouse entered thiselement. Inherited from UIElement.

[0748] PreviewMouseHover—An event reporting a mouse hover.

[0749] PreviewMouseLeave—An event reporting the mouse left this element.Inherited from UIElement.

[0750] PreviewMouseLeftButtonDown—An event reporting the left mousebutton was pressed. Inherited from UIElement.

[0751] PreviewMouseLeftButtonUp—An event reporting the left mouse buttonwas released. Inherited from UIElement.

[0752] PreviewMouseMove—An event reporting a mouse move. Inherited fromUIElement.

[0753] PreviewMouseRightButtonDown—An event reporting the right mousebutton was pressed. Inherited from UIElement.

[0754] PreviewMouseRightButtonUp—An event reporting the right mousebutton was released. Inherited from UIElement.

[0755] PreviewMouseWheel—An event reporting a mouse wheel rotation.Inherited from UIElement.

[0756] PreviewTextInput—An event announcing some text input. Inheritedfrom UIElement.

[0757] TextInput—An event announcing some text input. Inherited fromUIElement.

[0758] Field Description

[0759] AnimationEffectsProperty—Timeline property. Inherited fromUIElement.

[0760] ClipProperty—Clip Property Inherited from UIElement.

[0761] ClipToBoundsProperty—ClipToBounds Property Inherited fromUIElement.

[0762] CursorProperty—CursorProperty

[0763] DataContextProperty—DataContext DependencyProperty

[0764] FlowDirectionProperty—FlowDirectionProperty

[0765] FocusableProperty—The dependency ID for the Focusable property.

[0766] HeightProperty—HeightProperty

[0767] IDProperty—The dependency ID for the ID property.

[0768] IsEnabledProperty—The dependency ID for the IsEnabled property.

[0769] IsFocusedProperty—The dependency property for the IsFocusedproperty. Inherited from UIElement.

[0770] IsFocusWithinProperty—The dependency property for theIsFocusWithin property.

[0771] IsMouseCapturedProperty—The dependency property for theIsMouseCaptured property. Inherited from UIElement.

[0772] IsMouseDirectlyOverProperty—The dependency property for theIsMouseDirectlyOver property. Inherited from UIElement.

[0773] IsMouseOverProperty—The dependency property for the IsMouseOverproperty.

[0774] MarginProperty—MarginProperty

[0775] MaxHeightProperty—MaxHeight Property

[0776] MaxWidthProperty—MaxWidth Property

[0777] MinHeightProperty—MinHeight Property

[0778] MinWidthProperty—MinWidth Property

[0779] OpacityProperty—The Opacity property. Inherited from UIElement.

[0780] StyleProperty—Style Dependency Property

[0781] TimelineProperty—Timeline property. Inherited from UIElement.

[0782] VisibilityProperty—The Visibility property. Inherited fromUIElement.

[0783] WidthProperty—Width Property

[0784] Method Description

[0785] AddHandler—See overloaded method for details Inherited fromUIElement.

[0786] AdjustEventSource—Allows adjustment to the event source Inheritedfrom UIElement.

[0787] Arrange—Parents or system call this method to arrange theinternals of children on a second pass of layout update. Inherited fromUIElement.

[0788] ArrangeChildHelper—The helper method for a parent to call insteadof Arrange on a child during layout. Reads Width, Height, Min/MaxWidth,Min/MaxHeight from the child, uses reference size to resolve percentvalues and calls Arrange method on a child with modified arrangeSize.

[0789] ArrangeCore—ArrangeCore allows for the customization of thepositioning of children. Inherited from UIElement.

[0790] BuildRoute—Builds the EventRoute Inherited from UIElement.

[0791] BuildRouteCore—Allows FrameworkElement to augment the EventRoute

[0792] CaptureMouse—Captures the mouse to this element. Inherited fromUIElement.

[0793] ClearAllBindings—Removes all bindings attached to the element.

[0794] ClearBinding—Removes the binding attached to the specifiedDependencyProperty.

[0795] ClearValue—Clears the local value of a property Inherited fromDependencyObject.

[0796] DeferLoad—This purpose of this method as the name indicates is todefer the firing of the Loaded event

[0797] EndDeferLoad—This call is meant to match a prior DeferLoad call,thereby cause Loaded event to be fired if there are no more pendingEndDeferLoad calls.

[0798] EnsureVisuals—Build the current Style's VisualTreeEquals—Determines whether two Object instances are equal. Inherited fromObject.

[0799] Finalize—Releases all resources held by the Visual object.Inherited from Visual.

[0800] FindResource—Searches for a resource with the passed name andreturns it Focus—Focuses the keyboard on this element. Inherited fromUIElement.

[0801] FrameworkElement—Default DependencyObject constructorGetAnimationBaseValue—If the dependency property is animated this methodwill give you the value as if it was not animated. Inherited fromUIElement.

[0802] GetAnimations—Retrieves an animation collection associated with aDependencyID on this element. Inherited from UIElement.

[0803] GetAutomationProvider—Called by the Automation infrastructure torequest a provider object to provide additional properties for thiselement.

[0804] GetBinding—Returns the Binding for the specified property.

[0805] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0806] GetLocalValueEnumerator—Create a local value enumerator for thisinstance Inherited from DependencyObject.

[0807] GetRoutedEventIDs—Get RoutedEventIDs with handlers Inherited fromUIElement.

[0808] GetType—Gets the Type of the current instance. Inherited fromObject.

[0809] GetValue—Retrieve the value of a property Inherited fromDependencyObject.

[0810] HitTestCore—HitTestCore implements precise hit testing againstrender contents Inherited from RetainedVisual.

[0811] IDragDrop.OnDragEnter

[0812] IDragDrop.OnDragLeave

[0813] IDragDrop.OnDragOver

[0814] IDragDrop.OnDrop

[0815] IDragDrop.OnGiveFeedback

[0816] IDragDrop.OnQueryContinueDrag

[0817] ILogicalTreeNode.OnNewParent

[0818] ILogicalTreeNode.OnParentChanged

[0819] InvalidateArrange—Invalidates the arrange state for the element.The element will be queued for an update layout that will occurasynchronously.

[0820] MeasureCore will not be called unless InvalidateMeasure is alsocalled—or that something else caused the measure state to beinvalidated. Inherited from UIElement.

[0821] InvalidateMeasure—Invalidates the measurement state for theelement. This has the effect of also invalidating the arrange state forthe element. The element will be queued for an update layout that willoccur asynchronously. Inherited from UIElement.

[0822] InvalidateProperty—Invalidates a property Inherited fromDependencyObject.

[0823] InvalidateVisual—InvalidateVisual. Inherited from RetainedVisual.

[0824] IRetainedRender.Render—Inherited from UIElement.

[0825] IVisual.FindCommonVisualAncestor—Inherited from Visual.

[0826] IVisual.HitTest—Inherited from Visual.

[0827] IVisual.IsAncestorOf—Inherited from Visual.

[0828] IVisual.IsDescendantOf—Inherited from Visual.

[0829] IVisual.TransformFromAncestor—Inherited from Visual.

[0830] IVisual.TransformFromDescendant—Inherited from Visual.

[0831] IVisual.TransformFromVisual—Inherited from Visual.

[0832] IVisual.TransformToAncestor—Inherited from Visual.

[0833] IVisual.TransformToDescendant—Inherited from Visual.

[0834] IVisual.TransformToVisual—Inherited from Visual.

[0835] Measure Updates DesiredSize of the UIElement. Must typically becalled by parents from theor MeasureCore, to form recursive update. Thisis first pass of layout update. Inherited from UIElement.

[0836] MeasureChildHelper The helper method for a parent to call insteadof Measure on a child during layout. Reads Width, Height, Min/MaxWidth,Min/MaxHeight from the child, uses reference size to resolve percentvalues and calls Measure method on a child with correct constraint. Aslo‘clamps’ child's desired size using specified sizing properties.

[0837] MeasureCore Measurement override. Implement your size-to-contentlogic here. Inherited from UIElement.

[0838] MemberwiseClone Creates a shallow copy of the current Object.Inherited from Object.

[0839] OnAccessKey The access key for this element was invoked. Baseimplementation sets focus to the element. Inherited from UIElement.

[0840] OnChildDesiredSizeChanged Notification that is called by Measureof a child when it ends up with different desired size for the child.Inherited from UIElement.

[0841] OnDelayedInvalidate Inherited from DependencyObject in build.

[0842] OnGotFocus An event announcing that the keyboard is focused onthis element. Inherited from UIElement.

[0843] OnGotMouseCapture An event reporting that this element got themouse capture. Inherited from UIElement.

[0844] OnIsFocusedChanged An event reporting that the IsFocused propertyhas changed.

[0845] OnIsFocusWithinChanged An event reporting that the IsFocusWithinproperty changed.

[0846] OnIsMouseCapturedChanged An event reporting that theIsMouseCaptured property changed. Inherited from UIElement.

[0847] OnIsMouseDirectlyOverChanged An event reporting that theIsMouseDirectlyOver property has changed.

[0848] OnIsMouseOverChanged An event reporting that the IsMouseOverproperty changed.

[0849] OnKeyDown An event reporting a key was pressed. Inherited fromUIElement.

[0850] OnKeyUp An event reporting a key was released. Inherited fromUIElement.

[0851] OnLostFocus An event announcing that the keyboard is no longerfocused Inherited from UIElement.

[0852] OnLostMouseCapture An event reporting that this element lost themouse capture. Inherited from UIElement.

[0853] OnMouseEnter An event reporting the mouse entered this element.Inherited from UIElement.

[0854] OnMouseLeave An event reporting the mouse left this element.Inherited from UIElement.

[0855] OnMouseLeftButtonDown An event reporting the left mouse buttonwas pressed. Inherited from UIElement.

[0856] OnMouseLeftButtonUp An event reporting the left mouse button wasreleased. Inherited from UIElement.

[0857] OnMouseMove An event reporting a mouse move. Inherited fromUIElement.

[0858] OnMouseRightButtonDown An event reporting the right mouse buttonwas pressed. Inherited from UIElement.

[0859] OnMouseRightButtonUp An event reporting the right mouse buttonwas released. Inherited from UIElement.

[0860] OnMouseWheel An event reporting a mouse wheel rotation. Inheritedfrom UIElement.

[0861] OnPreviewGotFocus An event announcing that the keyboard isfocused on this element. Inherited from UIElement.

[0862] OnPreviewKeyDown An event reporting a key was pressed. Inheritedfrom UIElement.

[0863] OnPreviewKeyUp An event reporting a key was released. Inheritedfrom UIElement.

[0864] OnPreviewLostFocus An event announcing that the keyboard is nolonger focused Inherited from UIElement.

[0865] OnPreviewMouseEnter When the mouse enters an element, set thecursor. We do this in a class handler, rather than overridingOnIsMouseDirectlyOverChanged, because that is a virtual which can beoverridden and not called.

[0866] OnPreviewMouseLeave An event reporting the mouse left thiselement. Inherited from UIElement.

[0867] OnPreviewMouseLeftButtonDown An event reporting the left mousebutton was pressed. Inherited from UIElement.

[0868] OnPreviewMouseLeftButtonUp An event reporting the left mousebutton was released. Inherited from UIElement.

[0869] OnPreviewMouseMove An event reporting a mouse move. Inheritedfrom UIElement.

[0870] OnPreviewMouseRightButtonDown An event reporting the right mousebutton was pressed. Inherited from UIElement.

[0871] OnPreviewMouseRightButtonUp An event reporting the right mousebutton was released. Inherited from UIElement.

[0872] OnPreviewMouseWheel An event reporting a mouse wheel rotation.Inherited from UIElement.

[0873] OnPreviewTextlnput An event announcing some text input. Inheritedfrom UIElement.

[0874] OnPropertyInvalidated Notification that a specified property hasbeen invalidated

[0875] OnRender Render callback. Inherited from UIElement.

[0876] OnStyleChanged Style has changed

[0877] OnTextInput An event announcing some text input. Inherited fromUIElement.

[0878] RaiseCommand RaiseCommand Inherited from UIElement.

[0879] RaiseEvent Raise the events specified by RoutedEventID Inheritedfrom UIElement.

[0880] RaiseQueryStatus RaiseQueryStatus Inherited from UIElement.

[0881] ReadLocalValue Retrieve the local value of a property (if set)Inherited from DependencyObject.

[0882] ReferenceEquals Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0883] ReleaseMouseCapture Releases the mouse capture. Inherited fromUIElement.

[0884] RemoveHandler Removes all instances of the specified routed eventhandler for this object instance Inherited from UIElement.

[0885] RenderOpen RendeOpen opens the RetainedVisual for rendering.Inherited from RetainedVisual.

[0886] SetAnimations Associates an AnimationCollection with aDependencyID on this element. Inherited from UIElement.

[0887] SetBinding Attaches a binding.

[0888] SetContext Associates this UIContextObject with a UIContext.Inherited from UIContextObject.

[0889] SetResourceReference Searches for a resource called name and setsup a resource reference to it for the passed property.

[0890] SetValue Sets the local value of a property Inherited fromDependencyObject.

[0891] ToString Returns a String that represents the current Object.Inherited from Object.

[0892] TraverseFocus Request to move the focus from this element toanother element

[0893] UpdateLayout Call this method to ensure that the whoel subtree ofelements that includes this UIElement is properly updated. Inheritedfrom UIElement.

[0894] ValidateProperty Retrieve the value of a property (for use bynative cache backed custom get accessors) Inherited fromDependencyObject.

[0895] ValidatePropertyCore Allows subclasses to participate in propertyvalue computation

[0896] Property Attribute Description

[0897] AnimationEffects—The collection of AnimationEffect attached tothis element. Inherited from UIElement.

[0898] Clip—Clip Property Inherited from UIElement.

[0899] ClipToBounds—ClipToBounds Property Inherited from UIElement.

[0900] CommandLinks—CommandLinks Inherited from UIElement.

[0901] ComputedSize—Returns the actual size of the element. Inheritedfrom UIElement.

[0902] ContentOwner—ContentOwner is the ItemsControl whose items producethe content for the current element. This property can only be set inthe chrome template for an ItemsControl—it identifies the location inthe template where the ItemsControl should place the UI generated forits items.

[0903] Context—Returns the UIContext that this UIContextObject isassociated with. Inherited from UIContextObject.

[0904] Cursor—Cursor Property

[0905] DataContext—Gets or sets the data context for an element.

[0906] DependencyObjectType—Returns the DType that represents the CLRtype of this instance Inherited from DependencyObject.

[0907] DesiredSize—Returns the size the element computed during theMeasure pass. This is only valid if IsMeasureValid is true. Inheritedfrom UIElement.

[0908] FlowDirection—FlowDirection Property

[0909] Focusable—Gettor and Settor for Focusable Property

[0910] ForwardCommandsTo—CommandLinks Inherited from UIElement.

[0911] HasAnimations—Determines if any animations are present on thiselement Inherited from UIElement.

[0912] Height—Gets or sets the height of the element.

[0913] HitTestBounds—HitBounds returns the hit region bounding box forthe current visual. Inherited from Visual.

[0914] ID—ID property.

[0915] IsArrangeValid—Determines if the ComputedSize and position ofchild elements is valid. Inherited from UIElement.

[0916] IsDisposed—Gets a value that indicates whether the system hasdisposed of the Visual. Inherited from Visual.

[0917] IsEnabled—A property indicating if this element is enabled ornot.

[0918] IsFocused—A property indicating if the keyboard is focused onthis element or not. Inherited from UIElement.

[0919] IsFocusWithin—Indicates if Keyboard Focus is anywhere within inthe subtree starting at the current instance

[0920] IsLoaded—Read-only property that tells you if or not the currentelement has been loaded

[0921] IsMeasureValid—Determines if the DesiredSize is valid. Inheritedfrom UIElement.

[0922] IsMouseCaptured—A property indicating if the mouse is captured tothis element or not. Inherited from UIElement.

[0923] IsMouseDirectlyOver—A property indicating if the mouse is overthis element or not. Inherited from UIElement.

[0924] IsMouseOver—A property indicating if the mouse is over thiselement or not.

[0925] IsRequestingAnimationBaseValue—This property will return truewhile the class is calculating the animation base value requested by acall to GetAnimationBaseValue( ). Inherited from UIElement.

[0926] IsTreeSeparator—Indicates if the current instance is at the rootof a separate tree

[0927] KeyboardActive—Gettor and Settor for KeyboardActive Property

[0928] Margin—Margin Property

[0929] MaxHeight—MaxHeight Property

[0930] MaxWidth—MaxWidth Property

[0931] MinHeight—MinHeight Property

[0932] MinWidth—MinWidth Property

[0933] Opacity—Opacity accessor Inherited from UIElement.

[0934] Parent—Returns logical parent

[0935] RenderBounds—This property is only used if the RetainedVisualimplements RetainedRender. If not this property will throw anInvalidOperationException. The implementer must typically set thisproperty to the bounds of the ink drawn by his Render function in localcoordinate space. Inherited from RetainedVisual.

[0936] Resources—Current locally defined Resources

[0937] Style—Style property

[0938] Timeline—Timeline accessor. Inherited from UIElement.

[0939] Visibility—Visibility accessor Inherited from UIElement.

[0940] Width—Gets or sets the width of the element. classSystem.Windows.FrameworkElement : UIElement : RetainedVisual : Visual :DependencyObject : UIContextObject : Object Implements: IVisualIRetainedRender IInputElement ICommandTarget IFrameworklnputElementILogicalTreeNode IDragDrop ILoaded { public Void ClearAllBindings( )public Void ClearBinding(DependencyProperty dp) public Objectget_DataContext( ) public Binding GetBinding(DependencyProperty dp)public Void set_DataContext(Object value) public BindingSetBinding(DependencyProperty dp, Bind bind) public BindingSetBinding(DependencyProperty dp, String path) public BindingSetBinding(DependencyProperty dp, String path, BindType bindType) publicBinding SetBinding(DependencyProperty dp, String path, BindTypebindType, ObjectRef source) public Binding SetBinding(DependencyPropertydp, String path, BindType bindType, ObjectRef source, UpdateTypeupdateType) public Binding SetBinding(DependencyProperty dp, Stringpath, BindType bindType, ObjectRef source, UpdateType updateType,IDataTransformer transformer) public BindingSetBinding(DependencyProperty dp, String path, BindType bindType,ObjectRef source, UpdateType updateType, IDataTransformer transformer,CultureInfo culture) public Binding SetBinding(DependencyProperty dp,String path, BindType bindType, ObjectRef source, UpdateType updateType,IDataTransformer transformer, CultureInfo culture, BindFlags bindFlags)public static readonlyDependencyProperty DataContextProperty }

[0941] Templating instance representation

[0942] Method Description

[0943] AliasProperty—Set up a binding between a template child and thestyled container

[0944] AppendChild—Add a factory child to this factory

[0945] CreateInstance—Create an instance of the specified type

[0946] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0947] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0948] FrameworkElementFactory—Construction

[0949] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0950] GetType—Gets the Type of the current instance. Inherited fromObject.

[0951] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0952] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0953] SetBinding—Creates an initial binding in the factory's templatechildren.

[0954] SetValue—Simple value set on template child

[0955] ToString—Returns a String that represents the current Object.Inherited from Object.

[0956] Property Description

[0957] FirstChild—First child factory

[0958] IsSealed—FrameworkElementFactory mutability state

[0959] NextSibling—Next sibling factory

[0960] Parent—Parent factory

[0961] StyleID—Style identifier

[0962] Type—Type of object that the factory will produce classSystem.Windows.FrameworkElementFactory : Object { public VoidSetBinding(DependencyProperty dp, Bind bind) } classSystem.Windows.FrameworkPropertyMetadata : PropertyMetadata : Object {public Boolean get_Databindable( ) public Void set_Databindable(Booleanvalue) } enum sealed System.Windows.MetadataFlags : Enum : ValueType :Object Implements: IComparable IFormattable IConvertible { public staticMetadataFlags NoDatabind } abstract interface System.Windows.IApplyValue{ public virtual Void Apply(DependencyObject e, DependencyProperty dp) }

[0963] An abstract class, used as the base class for several otherprovided “Avalon” classes that manage a view of a data collection.

[0964] CollectionChanged—Occurs when the collection view changes. Thiscould mean that items were added or removed in the collection, or that anew sort or filter was applied to this view.

[0965] ProtectedCurrentChanged—A protected event. In derived classes,this event occurs after changing the position of the record pointer.

[0966] ProtectedCurrentChanging—A protected event. In derived classes,this event occurs before a change in currency. If necessary, handlers ofthe event can cancel the change.

[0967] Method Description

[0968] ChangedCurrent—Raises the implemented CurrentChanged event of theobject.

[0969] CollectionView—Initializes a new instance of a CollectionViewderived class. This constructor is protected in the base CollectionViewclass.

[0970] Contains—Determines whether a given data item belongs to thiscollection view.

[0971] ContainsItem—Determines whether a given data item belongs to thiscollection view or the unfiltered collection.

[0972] Equals—Determines whether two Object instances are equal.Inherited from Object.

[0973] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[0974] GetEnumerator—Returns an enumerator that can iterate through thecollection view.

[0975] GetHashCode—Serves as a hash function for a particular type,suitable for use in hashing algorithms and data structures like a hashtable. Inherited from Object.

[0976] GetType—Gets the Type of the current instance. Inherited fromObject.

[0977] IndexOf—Returns the index where the given data item belongs inthe collection, or −1 if the index of that item is unknown.

[0978] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[0979] OKToChangeCurrent—Determines whether it is allowable to changethe position of the current record pointer.

[0980] OnCollectionChanged—Implement this method to handleCollectionChanged events in the data collection that underlies thecollection view.

[0981] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[0982] Refresh—Refreshes the view. Reapplies any current sort or filterconditions, as set by various properties that declare sort or filtercriteria.

[0983] ToString—Returns a String that represents the current Object.Inherited from Object. abstract classSystem.ComponentModel.CollectionView : Object Implements: IEnumerableICollectionChange { protected Void ChangedCurrent( ) public virtualBoolean Contains(Object item) public virtual Boolean ContainsItem(Objectitem) public virtual Boolean get_CanFilter( ) public virtual Booleanget_CanSort( ) public ICollection get_Collection( ) public virtualIComparer get_Comparer( ) public virtual Int32 get_Count( ) publicvirtual ICurrentItem get_CurrentItem( ) public virtual Stringget_Filter( ) public virtual SortDescription[ ] get_Sort( ) publicObject get_ViewManagerData( ) public virtual IEnumerator GetEnumerator() public virtual Int32 IndexOf(Object item) protected BooleanOKToChangeCurrent( ) protected virtual Void OnCollectionChanged(Objectsender, CollectionChangeEventArgs args) public virtual Void Refresh( )public virtual Void set_Filter(String value) public virtual Voidset_Sort(SortDescription[ ] value) public Voidset_ViewManagerData(Object value) }

[0984] Represents the method that handles the CurrentChanged eventraised by collection views, or any class implementing the ICurrentlteminterface. Parameters sender System.Object.View that is proposing tochange current item. args System.EventArgs.Event arguments. Return ValueSystem.Void. class sealedSystem.ComponentModel.CurrentChangedEventHandler : MulticastDelegate :Delegate : Object Implements: ICloneable ISerializable { public virtualIAsyncResult BeginInvoke(Object sender, EventArgs args, AsyncCallbackcallback, Object object) public virtual Void EndInvoke(IAsyncResultresult) public virtual Void Invoke(Object sender, EventArgs args) }

[0985] Represents the method that handles the CurrentChanging eventraised by collection view classes, or any class implementing theICurrentltem interface.

[0986] Parameters

[0987] sender—System.Object. The collection view Object that is changingcurrency. This will be an instance of CollectionView a derived class, ora class implementing ICurrentltem.

[0988] args—System.ComponentModel.CancelEventArgs. Arguments of theevent, as an instance of CancelEventArgs.

[0989] Return Value System.Void.

[0990] This event is invoked immediately before the current recordpointer moves in this view. The Cancel property in the event argumentscan be used to cancel the proposed move, and this convention should berespected by the currency logic in custom collection views. SeeProtectedCurrentChanging for an example.

[0991] CollectionView is an abstract class. The event might be moreproperly understood by looking at actual derivations of the class, suchas ListCollectionView and ArrayListCollectionView. In these classes theevent does not include the “Protected” prefix. class sealedSystem.ComponentModel.CurrentChangingEventHandler : MulticastDelegate :Delegate : Object Implements: ICloneable ISerializable { public virtualIAsyncResult BeginInvoke(Object sender, CancelEventArgs args,AsyncCallback callback, Object object) public virtual VoidEndInvoke(IAsyncResult result) public virtual Void Invoke(Object sender,CancelEventArgs args) } Enables notifications that items within acollection have changed: an item has been added, removed, or the entirecollection has been refreshed. Event Description CollectionChanged -Occurs if the collection has changed its content. Arguments of the eventspecify the change that has taken place. This interface is implementedby the ArrayListDataCollection data collection class. abstract interfaceSystem.ComponentModel.ICollectionChange { }

[0992] An interface used to create collection view factory classes,which in turn create new CollectionView derived objects.

[0993] Method Description

[0994] CreateView—Creates a new view on the collection that implementsthis interface. Normally, this method is only called by a view manager,not by user code.

[0995] Normally, user code does not call methods on this interface. Thecommon way to obtain a view over a collection is to call GetView.abstract interface System.ComponentModel.ICollectionViewFactory { publicvirtual CollectionView CreateView( ) }

[0996] Maintains the concept of the current record pointer in acollection view.

[0997] Event Description

[0998] CurrentChanged—Occurs immediately after changing the position ofthe current record pointer within the collection view.

[0999] CurrentChanging—Occurs immediately before changing the positionof the current record pointer within the collection view. Handlers tothe event should have the opportunity to cancel the position move byusing the Cancel property of the returned arguments class to cancel themove.

[1000] Method Description

[1001] MoveFirst—Moves the record pointer to the first record in thecollection view.

[1002] MoveLast—Moves the record pointer to the last record in thecollection view.

[1003] MoveNext—Moves the record pointer to the next record in thecollection view.

[1004] MovePrevious—Moves the record pointer to the previous record inthe collection view.

[1005] MoveTo—Moves the record pointer to the specified record in thecollection view.

[1006] Property Description

[1007] BOF—Gets the Boolean value that declares whether the recordpointer is at or before the beginning of the collection array.

[1008] Current—Gets the current record located at the current recordpointer position.

[1009] EOF—Gets a Boolean value that declares whether the record pointeris at or beyond the end of the collection array.

[1010] Remarks

[1011] ArrayListCollectionView implements this interface indirectly, asdo several other provided collection view classes.

[1012] To access methods of ICurrentItem in collection views, get theCurrentItem object in the view. This object supports ICurrentItem andthus enables changing the current record position.

[1013] By choosing to not implement this interface, very simplecollection views can choose not to support currency, but this is notrecommended.

[1014] How Do I Navigate Through the Objects in a Data Collection View?

[1015] You can navigate through the objects in a data collection view byusing the methods provided in view classes that inherit the ICurrentIteminterface. Although the methods and properties involved are not directmembers of the view classes, you can call these methods by returning theCurrentItem object and calling the various ICurrentItem collectionnavigation methods on it. In most cases, implementations of collectionviews derive from CollectionView and inherit from ICurrentItem. Thereare several methods defined by ICurrentItem that are used for navigatingthe objects in the collection. MoveFirst MoveLast MoveNext MovePreviousMoveTo

[1016] MoveFirst and MoveLast take you to the first or last objects inthe collection, respectively. MoveNext and MovePrevious take you to thenext or previous objects in the collection, relative to the Currentobject. MoveTo accepts an object argument and moves the current recordpointer to that object's record if it could be found. In addition toattempting the desired move, these methods return Boolean values thatinform you whether the record pointer is now on an item that exists inthe current view (this distinction comes into play if you are viewing acollection with a filter applied).

[1017] In this C# example, the same function handles button clicks fromeither a Previous or Next button. MyCollectionView is a view that is aninstance of CollectionView. This is the base view class that implementsthe ICurrentItem interface. Most common view operations can be handledwith this base class, rather than choosing to cast the initiallyreturned view to the more specialized view classes ListCollectionView,BindingListCollectionView, or ArrayListCollectionView. public voidOnButton(Object sender, ClickEventArgs args) { Button b = sender asButton; switch(b.ID) { case “Previous”:MyCollectionView.CurrentItem.MovePrevious( );if(!MyCollectionView.CurrentItem.BOF) { FeedbackText.Text = “”; o =MyCollectionView.CurrentItem.Current as Order; myListBox.SelectedIndex =MyCollectionView.IndexOf(o); } else {MyCollectionView.CurrentItem.MoveFirst( ); FeedbackText.Text = “At firstrecord”; } break; case “Next”: MyCollectionView.CurrentItem.MoveNext( );if(!MyCollectionView.CurrentItem.EOF) { FeedbackText.Text = “”; o =MyCollectionView.CurrentItem.Current as Order; myListBox.SelectedIndex =MyCollectionView.IndexOf(o); } else {MyCollectionView.CurrentItem.MoveLast( ); FeedbackText.Text = “At lastrecord”; } break; } } abstract interfaceSystem.ComponentModel.ICurrentltem { public virtual Boolean get_BOF( )public virtual Object get_Current( ) public virtual Boolean get_EOF( )public virtual Boolean MoveFirst( ) public virtual Boolean MoveLast( )public virtual Boolean MoveNext( ) public virtual Boolean MovePrevious() public virtual Boolean MoveTo(Object item) }

[1018] Create a One-Way Binding to a Dynamically Updated Data Source

[1019] Classes that implement this interface can update the bound targetproperty whenever the source property changes.

[1020] Event Description

[1021] PropertyChanged—Occurs whenever a property of a data item classchanges.

[1022] Events

[1023] How Do I Implement Property Change Notification?

[1024] This example shows how to provide for property changenotification in your data items by implementing the IPropertyChangeinterface.

[1025] You can bind user interface (UI) presentation elements to dataitems with One-Time binding. The UI will then reflect the initial valueof the data item but will not automatically reflect changes in thatunderlying data item. “Avalon” also supports One-Way and Two-Waybinding. In One-Way binding the target of the binding respondsautomatically to changes in a source data item. To bind so that changesin your source data item are automatically reflected in your bindingtarget, you must typically add code to support property changenotifications. You do this by deriving your source data item class fromIPropertyChange and then declaring the PropertyChanged event as aPropertyChangedEventHandler delegate. Declaring the event is how youimplement the IPropertyChange interface on your data item. Within thedata item you then define your own notification method containingprogram logic that eventually raises the event by calling back throughits event handler. You typically call your notification method withinthe set method of your data item property when you determine that thedata value of the property has changed. The set method of your propertyis called when the property is assigned a value by outside users of yourdata item.

[1026] In the following code, the data item is declared as aNumberListItem class that derives from IPropertyChange. Though otherproperties of the data item could be exposed, in this example oneproperty, NLValue, is exposed as sufficient for this class. Incompliance with the IPropertyChange interface contract, the class alsoexposes the public event PropertyChanged. A privateNotifyPropertyChanged method is used internally as the method to callfor notification. It accepts the name of an exposed property as astring, in this case NLValue. Within the notification method the eventcondition is raised by calling the event handler through the declaredevent. Of course, as a precaution against a null reference exception,the callback is only attempted if the event has been assigned a non-nullreference to an event handler. That assignment is normally done by thesystem ahead of time when objects of this data item class areinstantiated. The callback invocation of the event handler also acceptsthe name of the property, but only if that name is enveloped within aPropertyChangedEventArgs object that is created anew for this purpose.To complete the notification support, within the set method of theproperty a call to the private NotifyPropertyChanged method is done whena change in the value of the property is detected. Both the valueassignment and the notification are done only if the new value passed tothe set method is different than the current value of the property,_NLValue. For C#, here is the declaration of the data item class. publicclass NumberListItem : IPropertyChange { private int_NLValue = 0; staticNumberListItem( ) { } public int NLValue { get { return_NLValue; } set {if (_NLValue!= value) { _NLValue = value;NotifyPropertyChanged(“NLValue”); } } } // The following variable andmethod provide the support for // handling property changenotifications. public event PropertyChangedEventHandler PropertyChanged;private void NotifyPropertyChanged(String info) { if (PropertyChanged!=null) PropertyChanged(this, new PropertyChangedEventArgs(info)); } }

[1027] For Microsoft® Visual Basic® .NET, here is the declaration of thedata item class. Public Class NumberListItem Implements IPropertyChangePrivate_NLValue As Integer = 0 Shared Sub New( ) End Sub ‘New

[1028] ‘The following event and method provide the support for ‘handling property change notifications.

[1029] Public Event PropertyChanged As PropertyChangedEventHandlerImplements IPropertyChange.PropertyChanged Private SubNotifyPropertyChanged(ByVal info As String) RaiseEventPropertyChanged(Me, New PropertyChangedEventArgs(info)) End Sub‘NotifyPropertyChanged Public Property NLValue( ) As Integer GetReturn_NLValue End Get Set If_NLValue < > value Then _NLValue = valueNotifyPropertyChanged(“NLValue”) End If End Set End Property End Class‘NumberListItem Create a One-Way Binding to a Dynamically Updated DataSource

[1030] This example shows how binding to a data object wherePropertyChanged is implemented with a one-way binding will refresh thebound properties in a control whenever the data changes.

[1031] For most bindings, you want to use either a one-way or two-waybinding, so that the destination element reflects data changes in thebound source property. If you want these updates to happen automaticallyas intended, it is an absolute requirement that the individual dataproperties each raise the PropertyChanged event upon an internal changein their value, and, therefore, either the overall data class or theindividual items in a data collection must typically implementIPropertyChange.

[1032] The C# example shown here is the complete code for a data classand includes an internal timer loop that produces real-time changes inthe underlying data properties. This scenario is similar to implementinga “stock ticker” in a Web page, where the application is consuming datathat could change at any time, but not necessarily writing back to thesource. using System; using System.ComponentModel; using System.Windows;using System.Windows.Controls; using System.ComponentModel; usingSystem.Windows.Data; namespace WCPSample { public classmyDataCollection: ArrayListDataCollection { publicmyDataCollection_changeThis; public myData item1 = new myData(“IchiroBobblehead”,(decimal)24.95); public myData item2 = new myData(“Edgar ToyDuck”,(decimal) 16.05); public myData item3 = new myData(“Jeff CirilloGolden Sombero”, (decimal) 0.99); public myDataCollection( ):base( ) {Add(item1); Add(item2); Add(item3); CreateTimer( ); } private voidCreateTimer( ) { System.Timers.Timer Timer1 = new System.Timers.Timer(); Timer1.Enabled = true; Timer1.Interval = 10000; Timer1.Elapsed += newSystem.Timers.ElapsedEventHandler(Timer1_Elapsed); } private voidTimer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {item1.BidItemPrice += (decimal) 1.10; item2.BidItemPrice += (decimal)0.40; } } public class myData: IPropertyChange { privatestring_biditemname = “Unset”; private decimal_biditemprice = (decimal)0.0; public myData(string NewBidItemName, decimal NewBidItemPrice) {_biditemname = NewBidItemName; _biditemprice = NewBidItemPrice; } publicstring BidItemName { get { return_biditemname; } set {if(_biditemname.Equals(value) = = false) { _biditemname = value; //CallNotify PropertyChanged whenever the property is updatedNotifyPropertyChanged(“BidItemName”); } } } public decimal BidItemPrice{ get { return_biditemprice; } set { if(_biditemprice.Equals(value) = =false) { _biditemprice = value; //Call Notify PropertyChanged wheneverthe property is updated NotifyPropertyChanged(“BidItemPrice”); } } }//Declare event public event PropertyChangedEventHandlerPropertyChanged; //NotifyPropertyChanged event handler to updateproperty value in binding private void NotifyPropertyChanged(stringpropName) { if (PropertyChanged !=null) { PropertyChanged(this, newPropertyChangedEventArgs(propName)); } } } } abstract interfaceSystem.ComponentModel.IPropertyChange { }

[1033] Describes a sort qualifier that is used to sort items in acollection when creating a view. An array of these qualifierdescriptions is used to set the Sort property of a collection view.

[1034] Method Description

[1035] Equals—Indicates whether this instance and a specified object areequal. Inherited from ValueType.

[1036] Finalize—Allows an Object to attempt to free resources andperform other cleanup operations before the Object is reclaimed bygarbage collection. Inherited from Object.

[1037] GetHashCode—Returns the hash code for this instance. Inheritedfrom ValueType.

[1038] GetType—Gets the Type of the current instance. Inherited fromObject.

[1039] MemberwiseClone—Creates a shallow copy of the current Object.Inherited from Object.

[1040] ReferenceEquals—Determines whether the specified Object instancesare the same instance. Inherited from Object.

[1041] SortDescription—Initializes a new instance of a SortDescriptionstructure.

[1042] ToString—Returns the fully qualified type name of this instance.Inherited from ValueType.

[1043] Property Description

[1044] Direction—Gets the sort direction value declared in this sortdirection item.

[1045] Empty—Represents an empty sort description array. This method isintended to be called statically.

[1046] PropertyName—Gets the property name declared by this sortdirection item. This property should be exposed as public in theunderlying collection.

[1047] How Do I Sort Data?

[1048] This example describes how to sort data in a data collectionview. A data collection is a group of data of type IEnumerable, wheremembers of the collection implement IPropertyChange and the collectionitself implements ICollectionChange. A data collection view is onepossible view of that collection, where additional conditions such assorting and filtering can be applied to the collection, but these viewsleave the underlying collection unchanged.

[1049] To sort the data, set the Sort property on any view class derivedfrom CollectionView. This property is set to an array of SortDescriptionstructures. Each structure describes one property of the data thatshould be the property sorted upon, and the sort direction. Items in thearray of these structures are handled sequentially when the sort isperformed.

[1050] The following C# example sorts the data in ascending order. Eachmember of the collection is an Order object and is sorted by thesequence of the order property in the data. MyALCollectionView is anArrayListCollectionView object obtained from the collection, and sdA isthe array of sort descriptions. sdA[0] = newSortDescription(“order”,ListSortDirection.Ascending);MyALCollectionView.Sort = sdA;

[1051] You also call Refresh on the view to have the sort order takeeffect.

[1052] MyALCollectionView.Refresh( );

[1053] Note: Alternatively, if you are using one of the collection typesprovided by “Avalon”, you can use the custom sort methods on itsmatching collection view. For instance, if your data collection is basedon ListCollectionView, you can use ListCollectionView.CustomSort. Thisapproach is not discussed here. struct sealedSystem.ComponentModel.SortDescription : ValueType : Object { publicListSortDirection get_Direction( ) public static SortDescription[ ]get_Empty( ) public String get_PropertyName( ) }

[1054] Thus, as described, the present invention provides a mechanismfor associating a source data value with a target property in such amanner that changes in the coding of the user interface and the logicmay be de-coupled. Thus, the present invention allows developers toeasily modify and enhance the user interface without requiring them tomodify the underlying logic of the application.

[1055] The above specification, examples and data provide a completedescription of the manufacture and use of the composition of theinvention. Since many embodiments of the invention can be made withoutdeparting from the spirit and scope of the invention, the inventionresides in the claims hereinafter appended.

What is claimed is:
 1. A method for providing an interface for afunction, comprising: receiving at least one parameter; and in responseto receiving the at least one parameter, performing an operationrelating to a binding on at least one property from at least one of datasources, data source classes, and data-specific implementations ofcollections and views.
 2. The method of claim 1, wherein performing theoperation, further comprises performing handling collection changedevents in data collection underlying a collection view.
 3. The method ofclaim 1, wherein performing the operation, further comprises performinga function relating to array list data collection.
 4. The method ofclaim 3, wherein performing the function relating to the array list datacollection, further comprises performing at least one of the functionswithin the set comprising: adding; clearing, creating a view, inserting,removing, reversing; setting a range; and sorting.
 5. The method ofclaim 1, wherein performing the operation, further comprises managingbindings between a dynamic property user interface and source data. 6.The method of claim 1, wherein performing the operation, furthercomprises getting the bind declaration object of a binding expression.7. The method of claim 1, wherein performing the operation, furthercomprises performing a collection view function.
 8. The method of claim1, wherein performing the operation, further comprises implementing acollection view that includes checks for context infinity.
 9. The methodof claim 1, wherein performing the operation, further comprisessupporting object references to objects being used as data context for abinding.
 10. The method of claim 1, wherein performing the operation,further comprises encapsulating arguments for data transfer events,wherein the events are routed events that are handled by a designatedhandler based on a delegate.
 11. The method of claim 1, whereinperforming the operation, further comprises handling a data transferevent raised by a binding.
 12. The method of claim 1, wherein performingthe operation, further comprises representing an object reference to anelement, with the object reference being specified by its element ID.13. The method of claim 12, wherein the object reference is an explicitobject reference.
 14. The method of claim 1, wherein performing theoperation, further comprises implementing a collection view forcollections based on a list.
 15. The method of claim 1, whereinperforming the operation, further comprises serving as a data source fordata binding.
 16. The method of claim 1, wherein performing theoperation, further comprises holding a collection of named parameters.17. The method of claim 1, wherein performing the operation, furthercomprises representing a single select statement to be submitted to adatabase.
 18. The method of claim 1, wherein performing the operation,further comprises encapsulating arguments passed in an event relating toat least one of an ObjectDataSource, and a RefreshCompleted event of anXmlDataSource.
 19. The method of claim 1, wherein performing theoperation, further comprises handling events relating to at least one ofa ObjectDataSource.RefreshCompleted event and aXmlDataSource.RefreshCompleted event.
 20. The method of claim 1, whereinperforming the operation, further comprises receiving a list of sqlcommands and names of tables that they should be used to fill.
 21. Themethod of claim 1, wherein performing the operation, further comprisesgetting data from a SQL Server for use in databinding.
 22. The method ofclaim 1, wherein performing the operation, further comprises allowingresource reference to a transformer class that is defined as code-behindin a current application.
 23. The method of claim 1, wherein performingthe operation, further comprises declaring namespaces to be used in Xmldata binding XPath queries.
 24. The method of claim 1, whereinperforming the operation, further comprises serving as a data source fordata binding to Extensible Markup Language (XML) content nodes.
 25. Themethod of claim 1, wherein performing the operation, further comprisesdeclaring an individual namespace within an Extensible Markup Language(XML) data source.
 26. The method of claim 1, wherein performing theoperation, further comprises managing a view of a data collection. 27.The method of claim 1, wherein performing the operation, furthercomprises handing a CurrentChanged event raised by collection views, orany class implementing the ICurrentItem interface.
 28. The method ofclaim 1, wherein performing the operation, further comprisesrepresenting a method that handles a CurrentChanging event raised bycollection view classes, or any class implementing the ICurrentIteminterface.
 29. The method of claim 1, wherein performing the operation,further comprises enabling notifications from at least one of thefollowing: items within a collection have changed: an item has beenadded, removed, or the entire collection has been refreshed.
 30. Themethod of claim 1, wherein performing the operation, further comprisescreating collection view factory classes, which in turn create newCollectionView derived objects.
 31. The method of claim 1, whereinperforming the operation, further comprises, maintaining a concept ofthe current record pointer in a collection view.
 32. The method of claim1, wherein performing the operation, further comprises creating aOne-Way Binding to a Dynamically Updated Data Source.
 33. The method ofclaim 1, wherein performing the operation, further comprises describinga sort qualifier that is used to sort items in a collection whencreating a view.
 34. At least one computer-readable medium for providingan interface for a function, comprising: receiving at least oneparameter; and in response to receiving the at least one parameter,performing an operation relating to a binding on at least one propertyfrom at least one of data sources, data source classes, anddata-specific implementations of collections and views.
 35. Thecomputer-readable medium of claim 34, wherein performing the operation,further comprises performing handling collection changed events in datacollection underlying a collection view.
 36. The computer-readablemedium of claim 34, wherein performing the operation, further comprisesperforming a function relating to array list data collection.
 37. Thecomputer-readable medium of claim 36, wherein performing the functionrelating to the array list data collection, further comprises performingat least one of the functions within the set comprising: adding;clearing, creating a view, inserting, removing, reversing; setting arange; and sorting.
 38. The computer-readable medium of claim 34,wherein performing the operation, further comprises managing bindingsbetween a dynamic property user interface and source data.
 39. Thecomputer-readable medium of claim 34, wherein performing the operation,further comprises getting the bind declaration object of a bindingexpression.
 40. The computer-readable medium of claim 34, whereinperforming the operation, further comprises perfroming a collection viewfunction.
 41. The computer-readable medium of claim 34, whereinperforming the operation, further comprises implementing a collectionview that includes checks for context infinity.
 42. Thecomputer-readable medium of claim 34, wherein performing the operation,further comprises supporting object references to objects being used asdata context for a binding.
 43. The computer-readable medium of claim34, wherein performing the operation, further comprises encapsulatingarguments for data transfer events, wherein the events are routed eventsthat are handled by a designated handler based on a delegate.
 44. Thecomputer-readable medium of claim 34, wherein performing the operation,further comprises handling a data transfer event raised by a binding.45. The computer-readable medium of claim 34, wherein performing theoperation, further comprises representing an object reference to anelement, with the object reference being specified by its element ID.46. The computer-readable medium of claim 45, wherein the objectreference is an explicit object reference.
 47. The computer-readablemedium of claim 34, wherein performing the operation, further comprisesimplementing a collection view for collections based on a list.
 48. Thecomputer-readable medium of claim 34, wherein performing the operation,further comprises serving as a data source for data binding.
 49. Thecomputer-readable medium of claim 34, wherein performing the operation,further comprises holding a collection of named parameters.
 50. Thecomputer-readable medium of claim 34, wherein performing the operation,further comprises representing a single select statement to be submittedto a database.
 51. The computer-readable medium of claim 34, whereinperforming the operation, further comprises encapsulating argumentspassed in an event relating to at least one of an ObjectDataSource, anda RefreshCompleted event of an XmlDataSource.
 52. The computer-readablemedium of claim 34, wherein performing the operation, further compriseshandling events relating to at least one of aObjectDataSource.RefreshCompleted event and aXmlDataSource.RefreshCompleted event.
 53. The computer-readable mediumof claim 34, wherein performing the operation, further comprisesreceiving a list of sql commands and names of tables that they should beused to fill.
 54. The computer-readable medium of claim 34, whereinperforming the operation, further comprises getting data from a SQLServer for use in databinding.
 55. The computer-readable medium of claim34, wherein performing the operation, further comprises allowingresource reference to a transformer class that is defined as code-behindin a current application.
 56. The computer-readable medium of claim 34,wherein performing the operation, further comprises declaring namespacesto be used in Xml data binding XPath queries.
 57. The computer-readablemedium of claim 34, wherein performing the operation, further comprisesserving as a data source for data binding to Extensible Markup Language(XML) content nodes.
 58. The computer-readable medium of claim 34,wherein performing the operation, further comprises declaring anindividual namespace within an Extensible Markup Language (XML) datasource.
 59. The computer-readable medium of claim 34, wherein performingthe operation, further comprises managing a view of a data collection.60. The computer-readable medium of claim 34, wherein performing theoperation, further comprises handing a CurrentChanged event raised bycollection views, or any class implementing the ICurrentItem interface.61. The computer-readable medium of claim 34, wherein performing theoperation, further comprises representing a method that handles aCurrentChanging event raised by collection view classes, or any classimplementing the ICurrentItem interface.
 62. The computer-readablemedium of claim 34, wherein performing the operation, further comprisesenabling notifications from at least one of the following: items withina collection have changed: an item has been added, removed, or theentire collection has been refreshed.
 63. The computer-readable mediumof claim 34, wherein performing the operation, further comprisescreating collection view factory classes, which in turn create newCollectionView derived objects.
 64. The computer-readable medium ofclaim 34, wherein performing the operation, further comprises,maintaining a concept of the current record pointer in a collectionview.
 65. The computer-readable medium of claim 34, wherein performingthe operation, further comprises creating a One-Way Binding to aDynamically Updated Data Source.
 66. The computer-readable medium ofclaim 34, wherein performing the operation, further comprises describinga sort qualifier that is used to sort items in a collection whencreating a view.